summary refs log tree commit diff
path: root/src/World/Clouds.cpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-12 22:57:53 +0200
committerMel <einebeere@gmail.com>2023-07-12 22:58:34 +0200
commitc0556f76fc5c8271c2eaa7ca91ad1c92c691d8bc (patch)
treea7c10af8e912ae0fa4aec58b15d8a6496a288e4d /src/World/Clouds.cpp
parentf09e5791837bb003f7c5db8c0e3162636bc9a9c2 (diff)
downloadmeowcraft-c0556f76fc5c8271c2eaa7ca91ad1c92c691d8bc.tar.zst
meowcraft-c0556f76fc5c8271c2eaa7ca91ad1c92c691d8bc.zip
Δt calculation and usage
Diffstat (limited to 'src/World/Clouds.cpp')
-rw-r--r--src/World/Clouds.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/World/Clouds.cpp b/src/World/Clouds.cpp
index 36f2441..2e0f76c 100644
--- a/src/World/Clouds.cpp
+++ b/src/World/Clouds.cpp
@@ -1,4 +1,5 @@
 #include "Clouds.hpp"
+#include "../Time.hpp"
 #include "../Math/MVP.hpp"
 #include "../Math/Perlin.hpp"
 #include "../Math/AABB.hpp"
@@ -33,8 +34,8 @@ Clouds::Clouds(Real ascept, Real fov, Real near, Real far, Vector<3, F32> sky_co
     m_program.unbind();
 }
 
-void Clouds::update(U64 time) {
-    m_x_offset += time / 5000.0;
+void Clouds::update(const Time& time) {
+    m_x_offset += 5.0 * time.delta();
 }
 
 void Clouds::render(const GFX::Camera& camera) const {