From e0ab38974d08268fd0bbbae16293afb31686c9f8 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 25 Jun 2015 18:00:28 -0400 Subject: do non-timer events synchronously --- src/map/npc.cpp | 2 +- src/map/npc.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/map/npc.cpp b/src/map/npc.cpp index c4187c1..a40a4ec 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -622,7 +622,7 @@ int npc_event(dumb_ptr sd, NpcEvent eventname, && (sd->bl_y < nd->bl_y - ys / 2 || nd->bl_y + ys / 2 < sd->bl_y)) return 1; } - if (sd->npc_id) + if (sd->npc_id && sd->npc_pos > -1 && args.size() < 1) // if called from a timer we process async, otherwise sync { sd->eventqueuel.push_back(eventname); return 1; diff --git a/src/map/npc.hpp b/src/map/npc.hpp index fa5b6a3..e230ffe 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -45,7 +45,6 @@ constexpr Species INVISIBLE_CLASS = wrap(32767); int npc_event_dequeue(dumb_ptr sd); int npc_event(dumb_ptr, NpcEvent, int, Slice); -int npc_event(BlockId, NpcEvent, int, Slice); inline int npc_event(dumb_ptr sd, NpcEvent npcname, int i) { -- cgit v1.2.3-70-g09d2