1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-10 15:14:28 +02:00

fix bubbles above water surface

This commit is contained in:
XProger
2018-11-19 06:05:24 +03:00
parent 7a8e7ef7a8
commit b2ffb1501e

View File

@@ -1531,7 +1531,10 @@ struct Bubble : Sprite {
h = s.ceiling * 256;
room = s.roomAbove;
}
time -= (pos.y - h) / speed - (1.0f / SPRITE_FPS);
if (pos.y < h)
time = 1.0f / SPRITE_FPS;
else
time -= (pos.y - h) / speed - (1.0f / SPRITE_FPS);
activate();
}