diff options
Diffstat (limited to 'client/player/controllable_player.gd')
-rw-r--r-- | client/player/controllable_player.gd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index a677fdb3..32fa3135 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -58,6 +58,7 @@ func _process(delta): update(delta, input, boost) super(delta) character.walking = input.length_squared() > 0.1 + character.boosting = boosting func update(dt: float, input: Vector2, boost: bool): input = input.limit_length(1.); @@ -69,7 +70,7 @@ func update(dt: float, input: Vector2, boost: bool): if boosting: stamina -= dt / BOOST_DURATION else: stamina += dt / BOOST_RESTORE stamina = max(min(stamina, 1.0), 0.0) - var speed = PLAYER_SPEED * (BOOST_FACTOR if boosting else 1) + var speed = PLAYER_SPEED * (BOOST_FACTOR if boosting else 1.) self.velocity_ += input * dt * speed; self.position_ += self.velocity_ * dt; self.velocity_ = self.velocity_ * exp( - dt * 15.); |