|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: player.c,v 1.103 2006/08/15 15:58:39 stpohle Exp $
|
|
|
|
/* $Id: player.c,v 1.104 2006/08/20 20:01:15 stpohle Exp $
|
|
|
|
* player.c - everything what have to do with the player */
|
|
|
|
* player.c - everything what have to do with the player */
|
|
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL.h>
|
|
|
@ -546,9 +546,9 @@ get_player_on (float x, float y, int pl_nr[])
|
|
|
|
void
|
|
|
|
void
|
|
|
|
player_died (_player * player, signed char dead_by, int network)
|
|
|
|
player_died (_player * player, signed char dead_by, int network)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (PS_IS_netplayer (player->state) && network == 0)
|
|
|
|
if ((player - players) != bman.p_nr && (player - players) != bman.p2_nr && PS_IS_netplayer (player->state) && network == 0)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
// player die !
|
|
|
|
// player die !
|
|
|
|
d_printf ("player_died (pl_nr:%d : %10s) current state: %d\n", player - players, player->name, player->state);
|
|
|
|
d_printf ("player_died (pl_nr:%d : %10s) current state: %d\n", player - players, player->name, player->state);
|
|
|
|
|
|
|
|
|
|
|
@ -901,7 +901,7 @@ void player_checkdeath (int pnr) {
|
|
|
|
if (map.state == MS_normal && bman.gametype == GT_deathmatch
|
|
|
|
if (map.state == MS_normal && bman.gametype == GT_deathmatch
|
|
|
|
&& PS_IS_dead (player->state) && player->frame >= gfx.dead.frames) {
|
|
|
|
&& PS_IS_dead (player->state) && player->frame >= gfx.dead.frames) {
|
|
|
|
/* check new position */
|
|
|
|
/* check new position */
|
|
|
|
d_printf ("Respawn for player %s\n", player->name);
|
|
|
|
d_printf ("player_checkdeath: Respawn for player %s\n", player->name);
|
|
|
|
|
|
|
|
|
|
|
|
player->pos.x = -1;
|
|
|
|
player->pos.x = -1;
|
|
|
|
player->pos.y = -1;
|
|
|
|
player->pos.y = -1;
|
|
|
|