diff --git a/TODO_LIST b/TODO_LIST index 7967788..8f30b9e 100644 --- a/TODO_LIST +++ b/TODO_LIST @@ -12,3 +12,7 @@ Current plans: Molik Flashbang Wall smoke + Anticheat: + Replace authority over player to server + Make rpc's to sync state + Implement client side state changes and sync calls diff --git a/project.godot b/project.godot index 22a7994..42619f9 100644 --- a/project.godot +++ b/project.godot @@ -11,9 +11,6 @@ config_version=5 [application] config/name="Chelimbalo" -config/name_localized={ -"ru_RU": "Челимбало" -} run/main_scene="uid://dstie24qkbc86" config/features=PackedStringArray("4.5", "Forward Plus") config/icon="res://icon.svg" diff --git a/scenes/gui/client_settings.tscn b/scenes/gui/client_settings.tscn index c48dd3e..0696618 100644 --- a/scenes/gui/client_settings.tscn +++ b/scenes/gui/client_settings.tscn @@ -32,7 +32,6 @@ layout_mode = 2 text = "Чувствительность" [node name="SensitivitySlider" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/Sensitivity"] -unique_name_in_owner = true custom_minimum_size = Vector2(256, 0) layout_mode = 2 size_flags_horizontal = 3 @@ -42,7 +41,6 @@ step = 0.001 value = 0.02 [node name="SensitivityBox" type="SpinBox" parent="CenterContainer/PanelContainer/VBoxContainer/Sensitivity"] -unique_name_in_owner = true layout_mode = 2 max_value = 0.1 step = 0.001 @@ -58,7 +56,6 @@ layout_mode = 2 text = "Геймплейные звуки" [node name="GameplayMainSlider" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/GameplayMainAudio"] -unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 max_value = 1.0 @@ -67,20 +64,12 @@ value = 1.0 [node name="LeaveButton" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer"] unique_name_in_owner = true -visible = false layout_mode = 2 text = "Покинуть сессию" -[node name="StopSession" type="Button" parent="CenterContainer/PanelContainer/VBoxContainer"] -unique_name_in_owner = true -visible = false -layout_mode = 2 -text = "Окончить сессию" - [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/FullscreenButton" to="CenterContainer/PanelContainer" method="_on_fullscreen_button_pressed"] [connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/FullscreenButton" to="CenterContainer/PanelContainer" method="_on_fullscreen_button_toggled"] [connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/Sensitivity/SensitivitySlider" to="CenterContainer/PanelContainer" method="_on_sensitivity_slider_value_changed"] [connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/Sensitivity/SensitivityBox" to="CenterContainer/PanelContainer" method="_on_sensitivity_box_value_changed"] [connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/GameplayMainAudio/GameplayMainSlider" to="CenterContainer/PanelContainer" method="_on_gameplay_main_slider_value_changed"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/LeaveButton" to="CenterContainer/PanelContainer" method="_on_leave_button_pressed"] -[connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/StopSession" to="CenterContainer/PanelContainer" method="_on_stop_session_pressed"] diff --git a/scripts/gui/client_settings_menu.gd b/scripts/gui/client_settings_menu.gd index 1a7a281..ec537f1 100644 --- a/scripts/gui/client_settings_menu.gd +++ b/scripts/gui/client_settings_menu.gd @@ -6,8 +6,6 @@ func _ready() -> void: hide() Session.session_started.connect(%LeaveButton.show) Session.session_ended.connect(%LeaveButton.hide) - Lobby.lobby_created.connect(%StopSession.show) - Lobby.lobby_closed.connect(%StopSession.hide) func _input(event: InputEvent) -> void: if event.is_action_pressed("menu_settings"): @@ -26,16 +24,13 @@ func _on_fullscreen_button_toggled(toggled_on: bool) -> void: DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if toggled_on else DisplayServer.WINDOW_MODE_WINDOWED) func _on_sensitivity_slider_value_changed(value: float) -> void: - %SensitivityBox.set_value_no_signal(value) + $VBoxContainer/Sensitivity/SpinBox.set_value_no_signal(value) ClientSettings.SENSITIVITY = value func _on_sensitivity_box_value_changed(value: float) -> void: - %SensitivitySlider.set_value_no_signal(value) + $VBoxContainer/Sensitivity/HSlider.set_value_no_signal(value) ClientSettings.SENSITIVITY = value + func _on_leave_button_pressed() -> void: Session.quit_session() - -func _on_stop_session_pressed() -> void: - if multiplayer.is_server(): - Session.end_session() diff --git a/scripts/multiplayer/session.gd b/scripts/multiplayer/session.gd index 14fc71b..532d15b 100644 --- a/scripts/multiplayer/session.gd +++ b/scripts/multiplayer/session.gd @@ -152,17 +152,12 @@ func end_session() -> void: buy_timer.stop() object_containers.clear() session_ended.emit() - session_started_flag = false - dynamic_objects_spawner = null - plants = [] - plant_deadzones = {} func quit_session() -> void: if multiplayer.is_server(): end_session() - await get_tree().create_timer(0.1).timeout else: session_ended.emit() session_started_flag = false