From 634d326825589f6ca87f2b9ee3760faabfd6ab30 Mon Sep 17 00:00:00 2001 From: lL1l1 <82986251+lL1l1@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:32:03 -0800 Subject: [PATCH] Implement adding exe as argument to launch script --- scripts/LaunchFAInstances.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/LaunchFAInstances.ps1 b/scripts/LaunchFAInstances.ps1 index 8a22fca4a6..79aaca8029 100644 --- a/scripts/LaunchFAInstances.ps1 +++ b/scripts/LaunchFAInstances.ps1 @@ -2,7 +2,8 @@ [int]$players = 2, # Default to 2 instances (1 host, 1 client) [string]$map = "/maps/scmp_009/SCMP_009_scenario.lua", # Default map: Seton's Clutch [int]$port = 15000, # Default port for hosting the game - [int]$teams = 2 # Default to two teams, 0 for FFA + [int]$teams = 2, # Default to two teams, 0 for FFA + [string]$exe = "ForgedAlliance.exe" # exe filepath string, can be relative or exact ) # Base path to the bin directory @@ -58,7 +59,12 @@ function Launch-GameInstance { [string]$arguments ) - # Add window position and size arguments + # Add exe argument used by debugger + if ($gameExecutable -eq $debuggerExecutable) { + $arguments = "$exe $arguments" + } + + # Add window position and size arguments $arguments += " /position $xPos $yPos /size $windowWidth $windowHeight" try {