summaryrefslogtreecommitdiff
path: root/src/map/pc.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-09-10 22:30:23 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-15 11:46:39 -0400
commit4cb881c88f5e1879e89ab2c830a622a2edfb0f82 (patch)
tree6f7dcf8a338fbf4bfac846c1ce7bf31da16672ea /src/map/pc.cpp
parentf3dd34b5172f2bcb4f79d472e4c8ba2dbfe9cce0 (diff)
downloadtmwa-4cb881c88f5e1879e89ab2c830a622a2edfb0f82.tar.gz
tmwa-4cb881c88f5e1879e89ab2c830a622a2edfb0f82.tar.bz2
tmwa-4cb881c88f5e1879e89ab2c830a622a2edfb0f82.tar.xz
tmwa-4cb881c88f5e1879e89ab2c830a622a2edfb0f82.zip
do not bind trigger detection to map cells
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r--src/map/pc.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 7940812..1440454 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -2457,9 +2457,7 @@ void pc_walk(TimerData *, tick_t tick, BlockId id, unsigned char data)
}
}
- if (bool(map_getcell(sd->bl_m, x, y) & MapCell::NPC_NEAR))
- npc_touch_areanpc(sd, sd->bl_m, x, y);
- else
+ if (npc_touch_areanpc(sd, sd->bl_m, x, y) != 2)
sd->areanpc_id = BlockId();
}
interval_t i = calc_next_walk_step(sd);
@@ -2563,9 +2561,7 @@ int pc_stop_walking(dumb_ptr<map_session_data> sd, int type)
void pc_touch_all_relevant_npcs(dumb_ptr<map_session_data> sd)
{
- if (bool(map_getcell(sd->bl_m, sd->bl_x, sd->bl_y) & MapCell::NPC_NEAR))
- npc_touch_areanpc(sd, sd->bl_m, sd->bl_x, sd->bl_y);
- else
+ if (npc_touch_areanpc(sd, sd->bl_m, sd->bl_x, sd->bl_y) != 2)
sd->areanpc_id = BlockId();
}