player start fixed.. not all players have been set right..

maybe i need to rewrite the code to setting the
players on the field soon
origin
stpohle 22 years ago
parent 27726ec2a3
commit 702472a247

@ -1,4 +1,4 @@
/* $Id: game.c,v 1.62 2003/12/28 01:21:43 stpohle Exp $
/* $Id: game.c,v 1.63 2003/12/28 01:35:35 stpohle Exp $
game.c - procedures for the game. */
#include <string.h>
@ -334,8 +334,8 @@ game_start ()
snd_music_start ();
map.state = MS_normal;
bman.timeout = bman.init_timeout;
s_calctimesync (); /* to clean up the timesyc
s_calctimesync (); * data run this twice */
s_calctimesync (); // to clean up the timesyc
s_calctimesync (); // data run this twice
};

@ -1,4 +1,4 @@
/* $Id: map.c,v 1.14 2003/12/24 02:38:15 stpohle Exp $ */
/* $Id: map.c,v 1.15 2003/12/28 01:35:35 stpohle Exp $ */
/* map handling, like generate and load maps. */
#include "bomberclone.h"
@ -182,8 +182,9 @@ map_set_playerposition (int usermap)
while (p == 50) {
p = 0;
dist--;
for (i = 0; (p < 50 && i < MAX_PLAYERS);) {
if (usermap) {
for (i = 0; (p < 50 && i < MAX_PLAYERS);)
if (PS_IS_playing (players[i].state))
{
int maxloop = 0;
while (maxloop < 200 && (PLX == -1 || PLY == -1)) {
maxloop++;
@ -211,7 +212,7 @@ map_set_playerposition (int usermap)
if (dy == 0)
dy = -1;
/* first check if there is and free place for us */
/* first check if there is a free place for us */
if (!((map.field[(int)PLX + dx][(int)PLY].type != FT_block && maxloop > 100) ||
map.field[(int)PLX + dx][(int)PLY].type == FT_nothing))
dx = -dx;
@ -240,7 +241,6 @@ map_set_playerposition (int usermap)
if (map.field[(int)PLX][(int)PLY + dy].type != FT_tunnel)
map.field[(int)PLX][(int)PLY + dy].type = FT_nothing;
}
}
}
if (PLX < 0 || PLY < 0) {
/* we could not set all fields or we don't run on a usermap */

Loading…
Cancel
Save