version 1.9 | | version 1.10 |
---|
| | |
/* | | /* |
* static char *rcsid_build_map = | | * static char *rcsid_build_map = |
* "$Id: build_map.c,v 1.9 2005/10/28 19:08:53 akirschbaum Exp $"; | | * "$Id: build_map.c,v 1.10 2005/11/05 21:32:17 ryo_saeba Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
free_object( tmp ); | | free_object( tmp ); |
sprintf( message, "You destroy the wall and redo the floor." ); | | sprintf( message, "You destroy the wall and redo the floor." ); |
} | | } |
else if ( FLOOR == tmp->type ) | | else if ( ( FLOOR == tmp->type ) || ( QUERY_FLAG(tmp, FLAG_IS_FLOOR ) ) ) |
{ | | { |
remove_ob( tmp ); | | remove_ob( tmp ); |
free_object( tmp ); | | free_object( tmp ); |
| | |
tmp = arch_to_object( new_floor ); | | tmp = arch_to_object( new_floor ); |
SET_FLAG( tmp, FLAG_IS_BUILDABLE ); | | SET_FLAG( tmp, FLAG_IS_BUILDABLE ); |
SET_FLAG( tmp, FLAG_UNIQUE ); | | SET_FLAG( tmp, FLAG_UNIQUE ); |
| | SET_FLAG( tmp, FLAG_IS_FLOOR ); |
tmp->type = FLOOR; | | tmp->type = FLOOR; |
insert_ob_in_map_at( tmp, pl->map, above_floor, above_floor ? INS_BELOW_ORIGINATOR : INS_ON_TOP, x, y ); | | insert_ob_in_map_at( tmp, pl->map, above_floor, above_floor ? INS_BELOW_ORIGINATOR : INS_ON_TOP, x, y ); |
| | |
| | |
return; | | return; |
} | | } |
| | |
while ( floor && ( floor->type != FLOOR ) ) | | while ( floor && ( floor->type != FLOOR ) && ( !QUERY_FLAG( floor, FLAG_IS_FLOOR ) ) ) |
floor = floor->above; | | floor = floor->above; |
| | |
if ( !floor ) | | if ( !floor ) |
| | |
return; | | return; |
} | | } |
| | |
if ( item->type == FLOOR ) | | if ( item->type == FLOOR || QUERY_FLAG(item,FLAG_IS_FLOOR) ) |
item = item->above; | | item = item->above; |
| | |
if ( !item ) | | if ( !item ) |