mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
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
This commit is contained in:
parent
2e4aca24f2
commit
e3d354f63c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user