mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00

This bug was a bit complex. This change ensures that cacheIn events get called before enterFastArea. In Ultima 8 only a couple of classes have cacheIn events, so it makes no real difference. In Crusader, this bug caused extra people in the rebel base because they got the wrong mission number during enterFastArea (the mission number is updated in a cacheIn event). The previous map switch code was re-making the CameraProcess as needed, but after the cacheIn usecode processes were created - so the new camera went to the front of the process queue. The first execution of the camera process then updates the fast area, and enterFastArea processes get added to the front of the queue again (in front of the cacheIn events). Switch to only updating the existing camera process where possible instead of creating a new one, so the execution order does not change.