diff options
author | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-20 21:25:25 +0200 |
---|---|---|
committer | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-20 21:25:25 +0200 |
commit | 99501cdc66733768a653280cea4059227f893f06 (patch) | |
tree | 7839967fa01fa526503da273cda4a7f41b709761 | |
parent | 8f195b0ce8359ce20496435aa6f518e7d13d992f (diff) | |
download | hurrycurry-99501cdc66733768a653280cea4059227f893f06.tar hurrycurry-99501cdc66733768a653280cea4059227f893f06.tar.bz2 hurrycurry-99501cdc66733768a653280cea4059227f893f06.tar.zst |
solved issue #63
-rw-r--r-- | client/menu/setup.gd | 6 | ||||
-rw-r--r-- | client/player/follow_camera.gd | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/client/menu/setup.gd b/client/menu/setup.gd index 470b0839..6c3c90cd 100644 --- a/client/menu/setup.gd +++ b/client/menu/setup.gd @@ -52,10 +52,10 @@ func _process(delta): func check(): - if username.text == "": return "Username cannot be empty" + if username.text == "": return tr("Username cannot be empty") var n = username.text.to_lower() - if n.begins_with("f") and n.ends_with("miller"): return "You cannot choose that name.\n(It's too close to your boss')" - if character == -1: return "You must select a hairstyle" + if n.begins_with("f") and n.ends_with("miller"): return tr("You cannot choose that name.\n(It's too close to your boss')") + if character == -1: return tr("You must select a hairstyle") return null func _on_sign_pressed(): diff --git a/client/player/follow_camera.gd b/client/player/follow_camera.gd index 5440f8b1..3c993ee0 100644 --- a/client/player/follow_camera.gd +++ b/client/player/follow_camera.gd @@ -2,6 +2,7 @@ # Copyright 2024 nokoe # Copyright 2024 tpart # Copyright 2024 metamuffin +# Copyright 2024 BigBrotherNii # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -31,6 +32,7 @@ const ZOOM_SPEED_DISCRETE: float = 1.0 const ZOOM_WEIGHT: float = 10.0 const MAX_ZOOM: float = 20.0 const MIN_ZOOM: float = 2.0 +const ZOOM_CURRENT_TO_MAX_RATIO: float = 1.35 @export var target: Node3D @@ -90,10 +92,11 @@ func follow(delta): camera_distance_target += Input.get_axis("zoom_in", "zoom_out") * ZOOM_SPEED * delta + # (ZOOM_CURRENT_TO_MAX_RATIO * camera_distance_target / MAX_ZOOM) simulates the exponential zooming for the mouse if Input.is_action_just_pressed("zoom_in_discrete"): - camera_distance_target -= ZOOM_SPEED_DISCRETE + camera_distance_target -= ZOOM_SPEED_DISCRETE * (ZOOM_CURRENT_TO_MAX_RATIO * camera_distance_target / MAX_ZOOM) elif Input.is_action_just_pressed("zoom_out_discrete"): - camera_distance_target += ZOOM_SPEED_DISCRETE + camera_distance_target += ZOOM_SPEED_DISCRETE * (ZOOM_CURRENT_TO_MAX_RATIO * camera_distance_target / MAX_ZOOM) camera_distance_target = clamp(camera_distance_target, MIN_ZOOM, MAX_ZOOM) |