Update launch-game.cmd to specify Engine.LaunchPath and support restarting

This commit is contained in:
abcdefg30
2021-09-29 13:03:02 +02:00
committed by teinarss
parent 5d83706eae
commit 280dd8e2a5

View File

@@ -1,6 +1,6 @@
@echo off
title OpenRA
for %%x in (%*) do (
for /F "delims==\ " %%x in ("%*") do (
if "%%~x" EQU "Game.Mod" (goto launch)
)
@@ -17,10 +17,12 @@ echo.
goto choosemod
:launchmod
bin\OpenRA.exe Engine.EngineDir=".." Game.Mod=%mod% %*
cd %~dp0%
bin\OpenRA.exe Engine.EngineDir=".." Engine.LaunchPath="%~dpf0" Game.Mod=%mod% %*
goto end
:launch
bin\OpenRA.exe Engine.EngineDir=".." %*
cd %~dp0%
bin\OpenRA.exe Engine.EngineDir=".." Engine.LaunchPath="%~dpf0" %*
:end
if %errorlevel% neq 0 goto crashdialog