aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/system/AISystem.cpp3
-rw-r--r--src/crepe/system/PhysicsSystem.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/crepe/system/AISystem.cpp b/src/crepe/system/AISystem.cpp
index 1bbac69..a20e28c 100644
--- a/src/crepe/system/AISystem.cpp
+++ b/src/crepe/system/AISystem.cpp
@@ -43,7 +43,8 @@ void AISystem::update() {
// Calculate the acceleration (using the above calculated force)
vec2 acceleration = force / rigidbody.data.mass;
// Finally, update Rigidbody's velocity
- rigidbody.data.linear_velocity += acceleration * duration_cast<seconds>(dt).count();
+ rigidbody.data.linear_velocity += acceleration * duration<float>(dt).count();
+
}
}
diff --git a/src/crepe/system/PhysicsSystem.cpp b/src/crepe/system/PhysicsSystem.cpp
index 77c3be7..78370d1 100644
--- a/src/crepe/system/PhysicsSystem.cpp
+++ b/src/crepe/system/PhysicsSystem.cpp
@@ -21,7 +21,7 @@ void PhysicsSystem::update() {
RefVector<Rigidbody> rigidbodies = mgr.get_components_by_type<Rigidbody>();
duration_t delta_time = loop_timer.get_scaled_fixed_delta_time();
- float dt = duration_cast<seconds>(delta_time).count();
+ float dt = duration<float>(delta_time).count();
float gravity = Config::get_instance().physics.gravity;
for (Rigidbody & rigidbody : rigidbodies) {