version 1.99 | | version 1.100 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.99 2006/01/07 18:05:07 akirschbaum Exp $"; | | * "$Id: map.c,v 1.100 2006/02/05 05:27:07 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
*/ | | */ |
if (ob->type != PLAYER && ! (mflags & P_IS_ALIVE) && (blocked==0)) return 0; | | if (ob->type != PLAYER && ! (mflags & P_IS_ALIVE) && (blocked==0)) return 0; |
| | |
| | /* if there isn't anytyhing alive on this space, and this space isn't |
| | * otherwise blocked, we can return now. Only if there is a living |
| | * creature do we need to investigate if it is part of this creature |
| | * or another. Likewise, only if something is blocking us do we |
| | * need to investigate if there is a special circumstance that would |
| | * let the player through (inventory checkers for example) |
| | */ |
| | if (!(mflags & P_IS_ALIVE) && !OB_TYPE_MOVE_BLOCK(ob, blocked)) return 0; |
| | |
if(ob->head != NULL) | | if(ob->head != NULL) |
ob=ob->head; | | ob=ob->head; |
| | |
uint8 flags = 0, oldflags, light=0, anywhere=0; | | uint8 flags = 0, oldflags, light=0, anywhere=0; |
New_Face *top,*floor, *middle; | | New_Face *top,*floor, *middle; |
object *top_obj, *floor_obj, *middle_obj; | | object *top_obj, *floor_obj, *middle_obj; |
MoveType move_block=0, move_slow=0, move_on=0, move_off=0; | | MoveType move_block=0, move_slow=0, move_on=0, move_off=0, move_allow=0; |
| | |
oldflags = GET_MAP_FLAGS(m,x,y); | | oldflags = GET_MAP_FLAGS(m,x,y); |
if (!(oldflags & P_NEED_UPDATE)) { | | if (!(oldflags & P_NEED_UPDATE)) { |
| | |
move_block |= tmp->move_block; | | move_block |= tmp->move_block; |
move_on |= tmp->move_on; | | move_on |= tmp->move_on; |
move_off |= tmp->move_off; | | move_off |= tmp->move_off; |
| | move_allow |= tmp->move_allow; |
| | |
if (QUERY_FLAG(tmp,FLAG_ALIVE)) | | if (QUERY_FLAG(tmp,FLAG_ALIVE)) |
flags |= P_IS_ALIVE; | | flags |= P_IS_ALIVE; |
| | |
(oldflags & ~P_NEED_UPDATE), flags); | | (oldflags & ~P_NEED_UPDATE), flags); |
} | | } |
SET_MAP_FLAGS(m, x, y, flags); | | SET_MAP_FLAGS(m, x, y, flags); |
SET_MAP_MOVE_BLOCK(m, x, y, move_block); | | SET_MAP_MOVE_BLOCK(m, x, y, move_block & ~move_allow); |
SET_MAP_MOVE_ON(m, x, y, move_on); | | SET_MAP_MOVE_ON(m, x, y, move_on); |
SET_MAP_MOVE_OFF(m, x, y, move_off); | | SET_MAP_MOVE_OFF(m, x, y, move_off); |
SET_MAP_MOVE_SLOW(m, x, y, move_slow); | | SET_MAP_MOVE_SLOW(m, x, y, move_slow); |