diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-19 20:23:54 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-19 20:23:54 +0200 |
commit | 153e778d7d7085d699cf98da38a1196e5e81331a (patch) | |
tree | b35723bc87980c07d046f042c0170aba735c853f | |
parent | 65f7af7182e725ba0d457e1df75794f0e8ed2654 (diff) | |
download | hurrycurry-153e778d7d7085d699cf98da38a1196e5e81331a.tar hurrycurry-153e778d7d7085d699cf98da38a1196e5e81331a.tar.bz2 hurrycurry-153e778d7d7085d699cf98da38a1196e5e81331a.tar.zst |
Revert "draft for accessible movement"
This reverts commit abcaa25c5b3de7da498494f36efebbafa34130a3.
-rw-r--r-- | client/player/controllable_player.gd | 22 | ||||
-rw-r--r-- | client/settings.gd | 1 | ||||
-rw-r--r-- | locale/en.ini | 1 |
3 files changed, 6 insertions, 18 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd index 9e7ce2b2..142d5f47 100644 --- a/client/player/controllable_player.gd +++ b/client/player/controllable_player.gd @@ -58,11 +58,10 @@ func _process(delta): super(delta) update_touch_scrolls() -var moving_duration = 0 func _process_movement(delta): var input = Input.get_vector("left", "right", "forwards", "backwards") if is_input_enabled() else Vector2.ZERO var boost = Input.is_action_pressed("boost") or (Global.get_setting("gameplay.latch_boost") and boosting) - input = input.rotated(-game.camera.angle_target) + input = input.rotated( - game.camera.angle_target) if Input.is_action_pressed("interact") or Input.is_action_just_released("interact"): input *= 0 else: @@ -70,13 +69,6 @@ func _process_movement(delta): int(floor(movement_base.position.x + sin(movement_base.rotation.y))), int(floor(movement_base.position.z + cos(movement_base.rotation.y))) ) - - if Global.get_setting("gameplay.accessible_movement"): - if input.length() < 0.5: moving_duration -= delta * 2 - else: moving_duration += delta - moving_duration = clamp(moving_duration, 0, 1) - input *= min(1, moving_duration) - interact() var was_boosting = boosting direction = input @@ -89,10 +81,8 @@ func _process_movement(delta): func update(dt: float, boost: bool): direction = direction.limit_length(1.); - if direction.length() > 0.05: - self.facing = direction + (self.facing - direction) * exp(-dt * 10.) - if direction.length() < 0.5: - direction *= 0 + if direction.length() > 0.1: + self.facing = direction + (self.facing - direction) * exp( - dt * 10.) rotation_ = atan2(self.facing.x, self.facing.y); boost = boost and direction.length() > 0.1 boosting = boost and (boosting or stamina >= 1.0) and stamina > 0 @@ -102,12 +92,12 @@ func update(dt: float, boost: bool): var speed = PLAYER_SPEED * (BOOST_FACTOR if boosting else 1.) self.velocity_ += direction * dt * speed self.position_ += self.velocity_ * dt - self.velocity_ = self.velocity_ * exp(-dt * PLAYER_FRICTION) + self.velocity_ = self.velocity_ * exp( - dt * PLAYER_FRICTION) collide(dt) func collide(dt: float): - for xo in range(-1, 2): - for yo in range(-1, 2): + for xo in range( - 1, 2): + for yo in range( - 1, 2): var tile = Vector2i(xo, yo) + Vector2i(self.position_) if !game.get_tile_collision(tile): continue tile = Vector2(tile) diff --git a/client/settings.gd b/client/settings.gd index 9318322b..9152c0e4 100644 --- a/client/settings.gd +++ b/client/settings.gd @@ -27,7 +27,6 @@ static func get_root(): ToggleSetting.new("setup_completed", false), ToggleSetting.new("tutorial_started", false), ToggleSetting.new("latch_boost", true), - ToggleSetting.new("accessible_movement", false), ]), SettingsCategory.new("graphics", [ PresetRow.new("preset", { diff --git a/locale/en.ini b/locale/en.ini index a0bdc635..7a1d9999 100644 --- a/locale/en.ini +++ b/locale/en.ini @@ -70,7 +70,6 @@ c.settings.gameplay.latch_boost=Always extend boost to maximum duration c.settings.gameplay.setup_completed=Initial setup complete. (Uncheck and restart to reenter) c.settings.gameplay.tutorial_started=Tutorial started c.settings.gameplay.usernames=Show username tags -c.settings.gameplay.accessible_movement=Accessible movement controls c.settings.gameplay=Gameplay c.settings.graphics.aa.disabled=Disabled c.settings.graphics.aa.fx=FXAA |