diff options
author | Paul Gilbert | 2009-11-29 09:02:02 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-11-29 09:02:02 +0000 |
commit | e3d354f63c31cdb0e45970403877e8b71e6d101c (patch) | |
tree | b3abf40e47249fe91fac09cbaac49f91ff7d3d87 /engines | |
parent | 2e4aca24f24e927081177cf2cfc14bf9364c3078 (diff) | |
download | scummvm-rg350-e3d354f63c31cdb0e45970403877e8b71e6d101c.tar.gz scummvm-rg350-e3d354f63c31cdb0e45970403877e8b71e6d101c.tar.bz2 scummvm-rg350-e3d354f63c31cdb0e45970403877e8b71e6d101c.zip |
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
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lure/res.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; |