- Fixed: respawning of the player will continue and

finish when we go into Hurry Mode.
- Fixed: bombs will start ticking when another special
  is taken or the player died.
- Fixed: statusbar will forced to update if a player
  finished respawning.
- Fixed: number of items which have been dropped. If not
  all items could been set a debug message will be printed
  into the console or stdout.txt.
- Fixed: items can not anymore droped on bombs.
origin
stpohle 22 years ago
parent 4e1e3fe28e
commit 95ae84066a

@ -1,4 +1,25 @@
$Id: ChangeLog,v 1.72 2004/02/08 02:25:34 stpohle Exp $
$Id: ChangeLog,v 1.73 2004/02/11 21:45:05 stpohle Exp $
- Fixed: respawning of the player will continue and
finish when we go into Hurry Mode.
- Fixed: bombs will start ticking when another special
is taken or the player died.
- Fixed: statusbar will forced to update if a player
finished respawning.
- Fixed: number of items which have been dropped. If not
all items could been set a debug message will be printed
into the console or stdout.txt.
- Fixed: items can not anymore droped on bombs.
- Fixes the issue of it making incorrect assumptions
about the initial range of bombs and placing players in
unsafe positions. by dcdillion
Version 0.11.2
==============
2004-02-08

@ -1,4 +1,4 @@
/* $Id: basic.h,v 1.19 2004/01/27 22:52:08 stpohle Exp $ */
/* $Id: basic.h,v 1.20 2004/02/11 21:45:06 stpohle Exp $ */
/* basic types which we need everywhere */
#ifndef _BC_BASIC_H_
@ -154,7 +154,8 @@ enum _specials {
SP_liquid, // liquid bombs
SP_kick, // kick bombs
SP_max // just to know how many types there are
SP_max, // just to know how many types there are
SP_clear // needed to let the server know we removed the special
};

@ -1,4 +1,4 @@
/* $Id: network.h,v 1.17 2004/02/08 22:49:42 stpohle Exp $
/* $Id: network.h,v 1.18 2004/02/11 21:45:06 stpohle Exp $
* network.h file... for everything what have to do with the network stuff
*/
@ -106,7 +106,7 @@ extern void net_game_send_player (int p_nr);
extern void net_game_send_playermove (int p_nr, int mustsend);
extern void net_game_send_bomb (int p, int b);
extern void net_game_send_field (int x, int y);
extern void net_game_send_special (int pl_nr, int ex_nr);
extern void net_game_send_special (int pl_nr, int ex_nr, int type);
extern void net_game_send_dropitems (int pl_nr, _flyingitem **fiptr, int cnt);
extern void net_game_send_respawn (int pl_nr);
extern void net_game_fillsockaddr ();

@ -1,4 +1,4 @@
/* $Id: flyingitems.c,v 1.2 2004/01/26 05:39:38 stpohle Exp $ */
/* $Id: flyingitems.c,v 1.3 2004/02/11 21:46:48 stpohle Exp $ */
#include "bomberclone.h"
#include "flyingitems.h"
@ -120,11 +120,12 @@ _point flitems_randompos (int p_nr) {
}
/* check if the field is good */
check = (to.x > 0 && to.y > 0 && to.x < map.size.x-1 && to.y < map.size.y-1 &&
flitems_checkfreepos (to) &&
(map.field[to.x][to.y].type == FT_nothing
|| (map.field[to.x][to.y].type == FT_stone && map.field[to.x][to.y].special == FT_nothing)));
} while ( !check && maxtry > 200);
check = (to.x > 0 && to.y > 0 && to.x < map.size.x-1 && to.y < map.size.y-1
&& flitems_checkfreepos (to)
&& (map.field[to.x][to.y].type == FT_nothing
|| (map.field[to.x][to.y].type == FT_stone && map.field[to.x][to.y].special == FT_nothing))
&& map.bfield[to.x][to.y] == 0);
} while ( !check && maxtry < 200);
if (!check) {
to.x = -1;
@ -146,18 +147,24 @@ void flitems_dropitems (int p_nr, _pointf from, int cnt_speed, int cnt_bombs, in
to = flitems_randompos (p_nr);
if (to.x != -1)
fiptr[lpos++] = flitems_additem (from, to, FT_shoe);
else
d_printf ("flitems_dropitems: (FT_shoe) item could not been set\n");
}
for (i = 0; i < cnt_bombs; i++) {
to = flitems_randompos (p_nr);
if (to.x != -1)
fiptr[lpos++] = flitems_additem (from, to, FT_bomb);
else
d_printf ("flitems_dropitems: (FT_bomb) item could not been set\n");
}
for (i = 0; i < cnt_range; i++) {
to = flitems_randompos (p_nr);
if (to.x != -1)
fiptr[lpos++] = flitems_additem (from , to, FT_fire);
else
d_printf ("flitems_dropitems: (FT_fire) item could not been set\n");
}
fiptr[lpos] = NULL;

@ -1,4 +1,4 @@
/* $Id: network.c,v 1.61 2004/02/04 22:56:55 patty21 Exp $ */
/* $Id: network.c,v 1.62 2004/02/11 21:46:48 stpohle Exp $ */
/*
network routines.
*/
@ -853,7 +853,7 @@ net_new_game ()
to make sure nothing bad happens with explosions
we send the ex_nr number too */
void
net_game_send_special (int pl_nr, int ex_nr)
net_game_send_special (int pl_nr, int ex_nr, int type)
{
int pl;
@ -864,7 +864,7 @@ net_game_send_special (int pl_nr, int ex_nr)
for (pl = 0; pl < MAX_PLAYERS; pl++)
if (!PS_IS_aiplayer (players[pl].state) && PS_IS_netplayer (players[pl].state) && pl != pl_nr && NET_CANSEND(pl))
send_special (&players[pl].net.addr, pl_nr, players[pl_nr].special.type, ex_nr);
send_special (&players[pl].net.addr, pl_nr, type, ex_nr);
};

@ -1271,9 +1271,16 @@ do_special (struct pkg_special *sp_pkg, _net_addr * addr)
if (addr->pl_nr != bman.p_servnr && addr->pl_nr != sp_pkg->pl_nr)
return;
players[sp_pkg->pl_nr].special.type = sp_pkg->typ;
bman.last_ex_nr = NTOH32 (sp_pkg->ex_nr);
special_use (sp_pkg->pl_nr);
/* set or use special */
if (sp_pkg->typ < SP_max) {
players[sp_pkg->pl_nr].special.type = sp_pkg->typ;
bman.last_ex_nr = NTOH32 (sp_pkg->ex_nr);
special_use (sp_pkg->pl_nr);
}
/* cleas special */
else if (sp_pkg->typ == SP_clear)
special_clear (sp_pkg->pl_nr);
};

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

@ -1,4 +1,4 @@
/* $Id: special.c,v 1.32 2004/02/05 21:32:18 stpohle Exp $ */
/* $Id: special.c,v 1.33 2004/02/11 21:46:48 stpohle Exp $ */
/* special.c - procedues to control the specials */
#include "bomberclone.h"
@ -22,7 +22,7 @@ special_trigger (int p_nr)
}
if (p_nr == bman.p_nr && GT_MP && z)
net_game_send_special (p_nr, ex_nr);
net_game_send_special (p_nr, ex_nr, p->special.type);
if (z) {
bman.last_ex_nr = ex_nr + 6;
@ -316,6 +316,8 @@ special_pickup (int p_nr, int s_nr)
{
_special *s = &players[p_nr].special;
if (s->type != s_nr)
special_clear (p_nr);
s->to = 0;
s->numuse = 0;
s->type = s_nr;
@ -361,6 +363,8 @@ special_clear (int p_nr)
players[p_nr].special.type = 0;
bman.updatestatusbar = 1;
if (bman.p_nr == p_nr)
net_game_send_special (p_nr, -1, SP_clear);
}

Loading…
Cancel
Save