Restart game after autoupdate

This commit is contained in:
Rendo 2025-12-17 02:03:41 +05:00
commit 7341b5f648

View file

@ -42,6 +42,7 @@ func download_button_pressed() -> void:
func patch_downloaded(result: int, _response_code: int, _headers: PackedStringArray, _body: PackedByteArray) -> void:
if result == OK:
OS.create_process(OS.get_executable_path(),OS.get_cmdline_args())
get_tree().quit()
else:
update_version_text.emit("[color=red]Ошибка загрузки новой версии:" + str(result) +"[/color]")