From e3d354f63c31cdb0e45970403877e8b71e6d101c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 29 Nov 2009 09:02:02 +0000 Subject: Bugfix for reactivating an NPC when it was previously deactivated at precisely the moment when it was about to do a pathfinding svn-id: r46189 --- engines/lure/res.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines') diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index c33ad49ef4..bd978ce0b9 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -656,6 +656,11 @@ Hotspot *Resources::addHotspot(uint16 hotspotId) { // Default characters to facing upwards until they start moving hotspot->setDirection(UP); hotspot->setCharRectY(0); + + // When reactivating an NPC, ensure that their previous state wasn't PROCESSING_PATH, since + // the pause has destroyed the previously decided destination position + if (!hData->npcSchedule.isEmpty() && (hData->npcSchedule.top().action() == PROCESSING_PATH)) + hData->npcSchedule.top().setAction(DISPATCH_ACTION); } return hotspot; -- cgit v1.2.3