diff options
author | tpart <tpart120@proton.me> | 2025-09-30 14:46:44 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2025-09-30 14:46:44 +0200 |
commit | 79aad14562d35a6ceb0981a35be6e7184a396763 (patch) | |
tree | f941bfda167fe6cbbbeca6c72786bba1c3c203f4 /client | |
parent | aeac0cd6d497e7b0e028cf03a1570cdd6932b65b (diff) | |
download | hurrycurry-79aad14562d35a6ceb0981a35be6e7184a396763.tar hurrycurry-79aad14562d35a6ceb0981a35be6e7184a396763.tar.bz2 hurrycurry-79aad14562d35a6ceb0981a35be6e7184a396763.tar.zst |
Always send ready packet when applicable
Diffstat (limited to 'client')
-rw-r--r-- | client/game.gd | 19 | ||||
-rw-r--r-- | client/system/settings.gd | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/client/game.gd b/client/game.gd index 727cb701..e9dff85b 100644 --- a/client/game.gd +++ b/client/game.gd @@ -301,6 +301,17 @@ func handle_packet(p): await get_parent()._menu_open() map.autobake = true in_lobby_updated.emit(in_lobby) + + if not in_lobby and not is_replay and not Global.using_touch and not join_state == JoinState.SPECTATING: + var using_joypad: bool = Global.using_joypad + var two_handed: bool = Global.hand_count >= 2 + var profile_name: String = "controls_%s_%s_handed_explained" % [("joypad" if using_joypad else "keyboard"), ("two" if two_handed else "one")] + if not Profile.read(profile_name): + menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", [profile_name, using_joypad, two_handed]) + else: + mp.send_ready() + else: + mp.send_ready() else: map.autobake = false await get_parent()._menu_exit() @@ -311,14 +322,6 @@ func handle_packet(p): toggle_join() elif not is_replay: menu.submenu("res://gui/menus/ingame.tscn") - elif not in_lobby and not is_replay and not Global.using_touch and p.state: - var using_joypad: bool = Global.using_joypad - var two_handed: bool = Global.hand_count >= 2 - var profile_name: String = "controls_%s_%s_handed_explained" % [("joypad" if using_joypad else "keyboard"), ("two" if two_handed else "one")] - if not Profile.read(profile_name): - menu.submenu("res://gui/overlays/controls_visualization/explanation.tscn", [profile_name, using_joypad, two_handed]) - else: - mp.send_ready() "score": if p.time_remaining != null: overlay_score.update(p.demands_failed, p.demands_completed, p.points, p.time_remaining) diff --git a/client/system/settings.gd b/client/system/settings.gd index da93890c..737ab84e 100644 --- a/client/system/settings.gd +++ b/client/system/settings.gd @@ -201,4 +201,4 @@ static func h_tutorial_disabled(val: bool): if not val: for input_method: String in ["keyboard", "joypad"]: for hand_count: String in ["one", "two"]: - Profile.write("controls_%s_%s_handed_explained" % [input_method, hand_count], false)
\ No newline at end of file + Profile.write("controls_%s_%s_handed_explained" % [input_method, hand_count], false) |