|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: field.c,v 1.40 2003/07/27 14:34:40 stpohle Exp $ */
|
|
|
|
|
/* $Id: field.c,v 1.41 2003/07/27 20:53:21 stpohle Exp $ */
|
|
|
|
|
/* field.c - procedures which are needed to control the field */
|
|
|
|
|
|
|
|
|
|
#include "bomberclone.h"
|
|
|
|
@ -315,7 +315,6 @@ field_checkisempty ()
|
|
|
|
|
void
|
|
|
|
|
field_loop ()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/* single game or multiplayer master, so check field state */
|
|
|
|
|
if (GT_MP_PTPM || bman.gametype == GT_single) {
|
|
|
|
|
|
|
|
|
@ -326,17 +325,26 @@ field_loop ()
|
|
|
|
|
bman.timeout = 0; // set the gametimeout to 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* to show the warning */
|
|
|
|
|
if (map.state == MS_normal && bman.timeout-- <= 0) {
|
|
|
|
|
bman.timeout = FIELDHURRYWARN;
|
|
|
|
|
map.state = MS_hurrywarn;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
if (GT_MP_PTPM)
|
|
|
|
|
net_send_servermode ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* gametimeout is 0 and we are still at more normal set randomly a
|
|
|
|
|
way to end the game */
|
|
|
|
|
if (bman.timeout-- <= 0 && map.state == MS_normal) {
|
|
|
|
|
if (bman.timeout-- <= 0 && map.state == MS_hurrywarn) {
|
|
|
|
|
int rndmax;
|
|
|
|
|
|
|
|
|
|
if (map.map_selection == MAPS_randgen)
|
|
|
|
|
rndmax = MS_max - 1; // generaged map
|
|
|
|
|
rndmax = MS_max - 2; // generaged map
|
|
|
|
|
else
|
|
|
|
|
rndmax = MS_max - 2; // user defined map
|
|
|
|
|
rndmax = MS_max - 3; // user defined map
|
|
|
|
|
|
|
|
|
|
map.state = 1 + s_random (rndmax);
|
|
|
|
|
map.state = 2 + s_random (rndmax);
|
|
|
|
|
d_printf ("Game Timeout 1 over: Random map.state = %d\n", map.state);
|
|
|
|
|
bman.timeout = GAME_TIMEOUTHURRY;
|
|
|
|
|
|
|
|
|
|