mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 08:17:40 +00:00
M4: Add guard against moving to invalid rooms in mine
This commit is contained in:
parent
5ac50d8154
commit
657a684415
@ -470,6 +470,7 @@ void Mine::mine_travel_link(int16 takeLink) {
|
||||
_mineRoomInfo = MINE_INFO[mineRoomIndex]; // Get this mine room info
|
||||
_entranceDoor = _mineRoomInfo.door[takeLink]; // Get which door to enter from in new room
|
||||
mineRoomIndex = _mineRoomInfo.link[takeLink]; // Get which link to take
|
||||
assert(mineRoomIndex != -1);
|
||||
|
||||
_mineRoomInfo = MINE_INFO[mineRoomIndex]; // Get new mine room info from new index
|
||||
_presentSceneID = _mineRoomInfo.scene_id; // Set the scene ID
|
||||
|
Loading…
Reference in New Issue
Block a user