Fix: Combat Camera in quick sands rooms

Combat Camera was taking "position.y" value that is the quick sand bottom, instead of "TopHeight" (formely maxceiling) that is the top surface of the quicksands camera.

When Lara digs enough in the quicksands, she automatically draws her weapons stopping the combat camera, that's why the bug only happened on certain range.
This commit is contained in:
Adngel 2025-02-27 10:31:27 +01:00
parent 1715fdb7b0
commit ae71ba601a

View file

@ -659,7 +659,7 @@ void CombatCamera(ItemInfo* item)
auto pointColl = GetPointCollision(Vector3i(Camera.target.x, Camera.target.y + CLICK(1), Camera.target.z), Camera.target.RoomNumber);
if (TestEnvironment(ENV_FLAG_SWAMP, pointColl.GetRoomNumber()))
Camera.target.y = g_Level.Rooms[pointColl.GetRoomNumber()].Position.y - CLICK(1);
Camera.target.y = g_Level.Rooms[pointColl.GetRoomNumber()].TopHeight - CLICK(1);
pointColl = GetPointCollision(Camera.target.ToVector3i(), Camera.target.RoomNumber);
Camera.target.RoomNumber = pointColl.GetRoomNumber();