Respawn GFX changed

origin r0-11-1
stpohle 22 years ago
parent b6b4a67395
commit de3de28b46

@ -1,4 +1,4 @@
/* $Id: player.c,v 1.75 2004/02/01 01:15:04 stpohle Exp $
/* $Id: player.c,v 1.76 2004/02/01 17:29:35 stpohle Exp $
* player.c - everything what have to do with the player */
#include <SDL.h>
@ -67,11 +67,14 @@ draw_player (_player * player)
dest.y = gfx.offset.y + ((player->pos.y - 1.0f) * gfx.block.y);
src.x = 0;
src.y = (2 * gfx.block.y) * (int)player->frame;
if ((int)player->frame < gfx.respawn.frames)
src.y = (2 * gfx.block.y) * (int)player->frame;
else
src.y = (2 * gfx.block.y) * (int)(gfx.respawn.frames - (((int)player->frame) - gfx.respawn.frames - 1));
gfx_blit (gfx.respawn.image, &src, gfx.screen, &dest, 0xFFFF);
if (player->frame > (player->gfx->ani.frames/2)) {
if (player->frame > gfx.respawn.frames) {
/* second: draw the player behind the star */
dest.x =
gfx.offset.x + player->gfx->offset.x + player->pos.x * gfx.block.x;
@ -588,7 +591,7 @@ player_animation (_player * player)
}
if (PS_IS_respawn (player->state)) {
if ((int)player->frame < gfx.respawn.frames)
if ((int)player->frame < 2*gfx.respawn.frames)
player->frame += (timefactor * ANI_PLAYERTIMEOUT);
}
};
@ -889,7 +892,7 @@ void player_checkdeath (int pnr) {
/* check for respawn finish */
if (map.state == MS_normal && bman.gametype == GT_deathmatch
&& PS_IS_respawn (player->state) && player->frame >= gfx.respawn.frames) {
&& PS_IS_respawn (player->state) && player->frame >= 2*gfx.respawn.frames) {
d_printf ("Respawn completed for player %s\n", player->name);
player->frame = 0;
player->state &= (0xFF - PSF_respawn);

Loading…
Cancel
Save