deleted unneeded stuff

origin r0-11-2
stpohle 22 years ago
parent c7574f9368
commit 0cc9012e82

@ -1,4 +1,4 @@
/* $Id: map.h,v 1.14 2004/02/08 00:49:14 stpohle Exp $ */
/* $Id: map.h,v 1.15 2004/02/08 01:34:46 stpohle Exp $ */
/* map.h */
#ifndef _MAP_H_
@ -86,7 +86,7 @@ extern void map_genrandom ();
extern void init_map_tileset();
extern void map_new (char *filename);
extern void map_load (FILE * fmap);
extern void map_set_playerposition (int usermap);
/* new functions for player positioning */
extern int map_ensure_corner_start_points();

@ -1,4 +1,4 @@
/* $Id: map.c,v 1.22 2004/02/08 00:40:20 stpohle Exp $ */
/* $Id: map.c,v 1.23 2004/02/08 01:30:42 stpohle Exp $ */
/* map handling, like generate and load maps. */
#include "bomberclone.h"
@ -128,6 +128,9 @@ map_new (char *filename)
map_find_and_add_start_points(pl_cnt - map_num_defined_start_points(), MAP_POSITION_TOLERENCE);
/* Set the Playerinformation */
map_set_playerposition (fmap != NULL);
/* put the fire powerups in the field */
map_fillitems (FT_fire, map.fire);
/* put the bomb powerups in the field */
@ -194,6 +197,26 @@ map_genrandom ()
}
/* will set the playerposition but in a way that we won't start on a block */
/* i am just too lazy to write this all again and again */
void
map_set_playerposition (int usermap)
{
int pl;
d_printf ("map_set_playerposition\n");
/* This is the new code that will set every player in a starting point
* It should never fail, but if it does, it will fall through to the old method
*/
for (pl = 0; pl < MAX_PLAYERS; pl++) {
if (PS_IS_used(players[pl].state)) {
map_place_player(pl);
}
}
}
/* load a random map */
void
map_random ()

Loading…
Cancel
Save