Merge branch 'samples-floors-lighting-fix' into samples/floors

This commit is contained in:
h4570 committed 2020-12-06 20:36:11 +01:00
commit 9fb2cb385a
2 files changed
+8 -3

No files matched your search

@@ -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;
+7 -2
View File
@@ -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;
}