Session closing and quitting fixes

This commit is contained in:
Rendo 2025-12-08 18:48:50 +05:00
commit 75427dd336
4 changed files with 27 additions and 3 deletions

View file

@ -152,12 +152,17 @@ 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