… | |
… | |
302 | object *the_wall = 0; |
302 | object *the_wall = 0; |
303 | object *new_wall = 0; |
303 | object *new_wall = 0; |
304 | archetype *wall_arch = 0; |
304 | archetype *wall_arch = 0; |
305 | |
305 | |
306 | /* first find the wall */ |
306 | /* first find the wall */ |
307 | for (the_wall = get_map_ob (the_map, i, j); the_wall != NULL; the_wall = the_wall->above) |
307 | for (the_wall = GET_MAP_OB (the_map, i, j); the_wall != NULL; the_wall = the_wall->above) |
308 | if ((the_wall->move_type & MOVE_WALK) && the_wall->type != EXIT && the_wall->type != TELEPORTER) |
308 | if ((the_wall->move_type & MOVE_WALK) && the_wall->type != EXIT && the_wall->type != TELEPORTER) |
309 | break; |
309 | break; |
310 | |
310 | |
311 | |
311 | |
312 | /* if what we found is a door, don't remove it, set the_wall to NULL to |
312 | /* if what we found is a door, don't remove it, set the_wall to NULL to |
… | |
… | |
396 | new_wall->x = i; |
396 | new_wall->x = i; |
397 | new_wall->y = j; |
397 | new_wall->y = j; |
398 | if (the_wall && the_wall->map) |
398 | if (the_wall && the_wall->map) |
399 | { |
399 | { |
400 | the_wall->remove (); |
400 | the_wall->remove (); |
401 | the_wall->destroy (0); |
401 | the_wall->destroy (); |
402 | } |
402 | } |
403 | the_wall->move_block = MOVE_ALL; |
403 | the_wall->move_block = MOVE_ALL; |
404 | insert_ob_in_map (new_wall, the_map, new_wall, INS_NO_MERGE | INS_NO_WALK_ON); |
404 | insert_ob_in_map (new_wall, the_map, new_wall, INS_NO_MERGE | INS_NO_WALK_ON); |
405 | } |
405 | } |
406 | else |
406 | else |