aboutsummaryrefslogtreecommitdiff
path: root/game/StartGameScript.cpp
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2025-01-06 11:11:25 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2025-01-06 11:11:25 +0100
commit20ae1e9dc2043ef3c190f77dd5f9de74bcd533de (patch)
treee4f4789f242bd4e60f5eae7bd8cc0d233da5be2a /game/StartGameScript.cpp
parentb31934cc6867be10e986a4bd4d0ab81dc91d56ec (diff)
Added dt
Diffstat (limited to 'game/StartGameScript.cpp')
-rw-r--r--game/StartGameScript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/StartGameScript.cpp b/game/StartGameScript.cpp
index 72bdcd5..c786eb4 100644
--- a/game/StartGameScript.cpp
+++ b/game/StartGameScript.cpp
@@ -51,7 +51,7 @@ void StartGameScript::fixed_update(crepe::duration_t dt) {
// Start camera movement, enable player jumping and disable this script
if (player_transform.position.x > 500) {
Rigidbody & rb = this->get_components_by_name<Rigidbody>("camera").front();
- rb.data.linear_velocity = vec2(PLAYER_SPEED, 0);
+ rb.data.linear_velocity = vec2(PLAYER_SPEED * dt.count(), 0);
BehaviorScript & player_script
= this->get_components_by_name<BehaviorScript>("player").front();
player_script.active = true;