respawn animation on network players fixed

origin
stpohle 22 years ago
parent 4a1b9b79f5
commit 69c308b736

@ -1,4 +1,6 @@
$Id: ChangeLog,v 1.57 2004/01/25 19:36:22 stpohle Exp $ $Id: ChangeLog,v 1.58 2004/01/30 22:32:50 stpohle Exp $
- Added: Deathmatch mode.
- Added: Kick Bombs special - Added: Kick Bombs special
@ -30,6 +32,8 @@ $Id: ChangeLog,v 1.57 2004/01/25 19:36:22 stpohle Exp $
- Added: Drop Items On Death element. You can collect now - Added: Drop Items On Death element. You can collect now
your opponents items if he died. your opponents items if he died.
- Fixed: Missing "Press F4 to Start" Screen Text in Multiplayer
Version 0.11.0 Version 0.11.0
============== ==============

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.73 2004/01/27 21:13:44 stpohle Exp $ /* $Id: game.c,v 1.74 2004/01/30 22:32:51 stpohle Exp $
game.c - procedures for the game. */ game.c - procedures for the game. */
#include <string.h> #include <string.h>
@ -95,9 +95,9 @@ game_draw_info ()
} }
if (bman.state == GS_ready && GT_MP_PTPM) if (bman.state == GS_ready && GT_MP_PTPM)
font_draw (100, 32, "Press F4 to start the game", 0, 0); font_gfxdraw (100, 32, "Press F4 to start the game", 0, COLOR_yellow, 0xFFFF);
else if (bman.state == GS_ready) else if (bman.state == GS_ready)
font_draw (100, 32, "Waiting for the Server to Start", 0, 0); font_gfxdraw (100, 32, "Waiting for the Server to Start", 0, COLOR_yellow, 0xFFFF);
} }
/* draw the warning part */ /* draw the warning part */

@ -1,4 +1,4 @@
/* $Id: gfx.c,v 1.31 2004/01/27 20:49:07 stpohle Exp $ */ /* $Id: gfx.c,v 1.32 2004/01/30 22:32:51 stpohle Exp $ */
/* gfx.c */ /* gfx.c */
#include "bomberclone.h" #include "bomberclone.h"
@ -122,6 +122,7 @@ gfx_load_players (int sx, int sy)
// getRGBpixel (tmpimage1, 0, 0, &r, &g, &b); // getRGBpixel (tmpimage1, 0, 0, &r, &g, &b);
// SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b)); // SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b));
gfx.respawn.image = SDL_DisplayFormat (tmpimage1); gfx.respawn.image = SDL_DisplayFormat (tmpimage1);
// SDL_SetAlpha(gfx.respawn.image, SDL_SRCALPHA, 0);
SDL_FreeSurface (tmpimage); SDL_FreeSurface (tmpimage);
SDL_FreeSurface (tmpimage1); SDL_FreeSurface (tmpimage1);

@ -1,4 +1,4 @@
/* $Id: gfxpixelimage.c,v 1.8 2004/01/25 02:21:01 stpohle Exp $ */ /* $Id: gfxpixelimage.c,v 1.9 2004/01/30 22:32:51 stpohle Exp $ */
/* gfx pixel manipulation and image manipulation */ /* gfx pixel manipulation and image manipulation */
#include "bomberclone.h" #include "bomberclone.h"
@ -27,6 +27,7 @@ getRGBpixel (SDL_Surface * surface, int x, int y, int *R, int *G, int *B)
*B = b; *B = b;
}; };
/* getpixel for every BPP version */ /* getpixel for every BPP version */
Uint32 Uint32
getpixel (SDL_Surface * surface, int x, int y) getpixel (SDL_Surface * surface, int x, int y)

@ -1345,20 +1345,22 @@ void do_respawn (struct pkg_respawn *r_pkg, _net_addr *addr) {
return; return;
/* check if the right player is sending the information */ /* check if the right player is sending the information */
if (addr->pl_nr != bman.p_servnr && addr->pl_nr != r_pkg->pl_nr) if (addr->pl_nr != bman.p_servnr && r_pkg->pl_nr != addr->pl_nr)
return; return;
if ((r_pkg->state & PSF_respawn) == PSF_respawn) { if ((r_pkg->state & PSF_respawn) == PSF_respawn) {
players[r_pkg->pl_nr].pos.x = r_pkg->x; players[r_pkg->pl_nr].pos.x = r_pkg->x;
players[r_pkg->pl_nr].pos.y = r_pkg->y; players[r_pkg->pl_nr].pos.y = r_pkg->y;
if (PS_IS_dead (players[r_pkg->pl_nr].state)) players[r_pkg->pl_nr].state &= (0xFF - PSF_alife);
players[r_pkg->pl_nr].state |= PSF_respawn; players[r_pkg->pl_nr].state |= PSF_respawn;
players[r_pkg->pl_nr].frame = 0.0f;
} }
else if ((r_pkg->state & (PSF_respawn + PSF_alife)) == PSF_alife) { else if (r_pkg->state & (PSF_respawn + PSF_alife)) {
players[r_pkg->pl_nr].pos.x = r_pkg->x; players[r_pkg->pl_nr].pos.x = r_pkg->x;
players[r_pkg->pl_nr].pos.y = r_pkg->y; players[r_pkg->pl_nr].pos.y = r_pkg->y;
players[r_pkg->pl_nr].state |= PSF_alife; players[r_pkg->pl_nr].state |= PSF_alife;
players[r_pkg->pl_nr].state &= (0xFF - PSF_alife); players[r_pkg->pl_nr].state &= (0xFF - PSF_respawn);
} }
}; };

@ -1,4 +1,4 @@
/* $Id: player.c,v 1.72 2004/01/27 22:52:14 stpohle Exp $ /* $Id: player.c,v 1.73 2004/01/30 22:32:51 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>
@ -905,5 +905,8 @@ void player_checkdeath (int pnr) {
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)
net_game_send_respawn (pnr);
} }
}; };

Loading…
Cancel
Save