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

#183 fix "Boulder puzzle doesn't reset"

This commit is contained in:
XProger
2019-05-27 04:48:01 +03:00
parent 1a424464c9
commit a12769bb6d

View File

@@ -420,6 +420,11 @@ struct TrapBoulder : Controller {
TrapBoulder(IGame *game, int entity) : Controller(game, entity), velocity(0) {}
virtual void update() {
if (flags.active == 0) {
const TR::Entity &e = getEntity();
pos = vec3(e.x, e.y, e.z);
}
TR::Level::FloorInfo info;
getFloorInfo(getRoomIndex(), pos, info);
@@ -455,7 +460,6 @@ struct TrapBoulder : Controller {
if (pos.y > info.floor) {
if (onGround) {
pos = p;
deactivate(true);
game->checkTrigger(this, true);
return;
} else {