@ -1,4 +1,4 @@
/* $Id: player.c,v 1.8 0 2004/02/08 22:34:31 stpohle Exp $
/* $Id: player.c,v 1.8 1 2004/02/11 21:46:48 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>
@ -548,6 +548,7 @@ player_died (_player * player, signed char dead_by)
player - > frame = 0 ;
player - > frame = 0 ;
player - > state & = ( 0xFF - PSF_alife ) ;
player - > state & = ( 0xFF - PSF_alife ) ;
player - > dead_by = dead_by ;
player - > dead_by = dead_by ;
special_clear ( player - players ) ;
if ( GT_MP )
if ( GT_MP )
net_game_send_player ( player - players ) ;
net_game_send_player ( player - players ) ;
snd_play ( SND_dead ) ;
snd_play ( SND_dead ) ;
@ -888,13 +889,14 @@ void player_checkdeath (int pnr) {
}
}
}
}
/* check for respawn finish */
/* if the player is respawning check for finish of the animation
if ( map . state = = MS_normal & & bman . gametype = = GT_deathmatch
* reset some data of the player and force update of the status bar */
& & PS_IS_respawn ( player - > state ) & & player - > frame > = 2 * gfx . respawn . frames ) {
if ( PS_IS_respawn ( player - > state ) & & player - > frame > = 2 * gfx . respawn . frames ) {
d_printf ( " Respawn completed for player %s \n " , player - > name ) ;
d_printf ( " Respawn completed for player %s \n " , player - > name ) ;
player - > frame = 0 ;
player - > frame = 0 ;
player - > state & = ( 0xFF - PSF_respawn ) ;
player - > state & = ( 0xFF - PSF_respawn ) ;
player - > state | = PSF_alife ;
player - > state | = PSF_alife ;
special_clear ( pnr ) ;
if ( bman . dropitemsondeath ) {
if ( bman . dropitemsondeath ) {
player - > speed = bman . start_speed ;
player - > speed = bman . start_speed ;
@ -904,12 +906,15 @@ void player_checkdeath (int pnr) {
for ( i = 0 ; i < PI_max ; i + + )
for ( i = 0 ; i < PI_max ; i + + )
player - > ill [ i ] . to = 0.0f ;
player - > ill [ i ] . to = 0.0f ;
}
}
for ( i = 0 ; i < PI_max ; i + + )
for ( i = 0 ; i < PI_max ; i + + )
if ( player - > ill [ i ] . to > 0.0f )
if ( player - > ill [ i ] . to > 0.0f )
player_clear_ilness ( player , i ) ;
player_clear_ilness ( player , i ) ;
if ( GT_MP )
if ( GT_MP ) {
net_game_send_respawn ( pnr ) ;
net_game_send_respawn ( pnr ) ;
net_game_send_ill ( pnr ) ;
}
bman . updatestatusbar = 1 ;
}
}
} ;
} ;