From 4cb881c88f5e1879e89ab2c830a622a2edfb0f82 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 10 Sep 2015 22:30:23 -0400 Subject: do not bind trigger detection to map cells --- src/map/pc.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/map/pc.cpp') 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 sd, int type) void pc_touch_all_relevant_npcs(dumb_ptr 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(); } -- cgit v1.2.3-60-g2f50