diff --git a/src/samples/floors/managers/floor_manager.cpp b/src/samples/floors/managers/floor_manager.cpp index 4e5ae0d..251491c 100644 --- a/src/samples/floors/managers/floor_manager.cpp +++ b/src/samples/floors/managers/floor_manager.cpp @@ -96,7 +96,7 @@ void FloorManager::update(Player &t_player) { floors[i].animate(t_player); - if (floors[i].isByAudioTriggered == true) + if (floors[i].isByAudioTriggered) floors[i].mesh.color.a = 0x20; else floors[i].mesh.color.a = 0x80; diff --git a/src/samples/floors/objects/floor.cpp b/src/samples/floors/objects/floor.cpp index 7da6c79..ac859b8 100644 --- a/src/samples/floors/objects/floor.cpp +++ b/src/samples/floors/objects/floor.cpp @@ -23,7 +23,13 @@ const float FLOOR_ANIMATION_Y_MAX = 10.0F; // Constructors/Destructors // ---- -Floor::Floor() {} +Floor::Floor() +{ + animTimer = 0; + animDirection = 0; + initOffset = 0; + isByAudioTriggered = false; +} Floor::~Floor() {} @@ -44,7 +50,6 @@ void Floor::init(const Mesh &mother, const Point &spiral, const u8 &initOffset) this->animTimer = rand() % FLOOR_ANIMATION_LENGTH; this->mesh.shouldBeLighted = true; this->mesh.shouldBeFrustumCulled = true; - this->animDirection = 0; this->mesh.position.x = spiral.x * 80.0F; this->mesh.position.z = spiral.y * 80.0F; }