Allow the player to stand on a cell occupied by disabled/hidden npc (#7154)
Fixed #7153
This commit is contained in:
parent
e3c2db65c4
commit
c5031982d2
@ -559,6 +559,11 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type, int flag)
|
||||
if (type&~BL_MOB)
|
||||
for( bl = mapdata->block[bx+by*mapdata->bxs] ; bl != NULL ; bl = bl->next )
|
||||
if(bl->x == x && bl->y == y && bl->type&type) {
|
||||
if (bl->type == BL_NPC) { // Don't count hidden or invisible npc. Cloaked npc are counted
|
||||
npc_data *nd = BL_CAST(BL_NPC, bl);
|
||||
if (nd && (nd->bl.m < 0 || nd->sc.option && nd->sc.option&(OPTION_HIDE|OPTION_INVISIBLE)))
|
||||
continue;
|
||||
}
|
||||
if(flag&1) {
|
||||
struct unit_data *ud = unit_bl2ud(bl);
|
||||
if(!ud || ud->walktimer == INVALID_TIMER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user