Fix linked list corruption

This commit is contained in:
Lwmte 2022-12-07 00:48:31 +02:00
parent 0a77cf81b5
commit f77a39ee2c

View file

@ -875,13 +875,13 @@ void Moveable::SetRoom(short room)
m_item->RoomNumber = room;
else
{
ItemNewRoom(m_num, room);
// HACK: For Lara, we need to manually force Location.roomNumber to new one,
// or else camera won't be updated properly.
if (m_item->IsLara())
m_item->RoomNumber = m_item->Location.roomNumber = room;
ItemNewRoom(m_num, room);
m_item->Location.roomNumber = room;
}
}