From 17ca966473a1acc625ee09ad946d910a2a71ea60 Mon Sep 17 00:00:00 2001 From: RT Date: Fri, 24 Jul 2026 10:02:13 -0500 Subject: [PATCH] Fix Load File mech lookup: use stock_array to get chassis name mech[j] in the flat sorted array hits variant entries (e.g. 'Assassin2 A' sorts before 'AssassinII' alphabetically, pushing all subsequent chassis indices off by 1 or more). The script's stock_array[] maps each chassis index -> its actual position in the flat mech[] array, bypassing variant entries. Fix: mech[allowed_mechs[j]] -> mech[stock_array[allowed_mechs[j]]] Only stock (chassis) names are supported in Mech= field. Operators can adjust variants manually after Load File is clicked. No rebuild required (script-only change). --- Gameleap/mw4/Content/ShellScripts/ConLobby.script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gameleap/mw4/Content/ShellScripts/ConLobby.script b/Gameleap/mw4/Content/ShellScripts/ConLobby.script index 64fc4d6e..efb30edf 100644 --- a/Gameleap/mw4/Content/ShellScripts/ConLobby.script +++ b/Gameleap/mw4/Content/ShellScripts/ConLobby.script @@ -1726,9 +1726,11 @@ main if (!equal$(szAutoMech, "")) { #if USE_ALLOWED_MECHS + // stock_array[j] = index in mech[] where chassis j lives (skips variant entries). + // mech[allowed_mechs[j]] would hit variant names; stock_array corrects this. for (j = 0; j < MAX_ALLOWED_MECHS; j++) { - if equal$(mech[allowed_mechs[j]], szAutoMech) + if equal$(mech[stock_array[allowed_mechs[j]]], szAutoMech) { o_mech_variant[k].nselected = j break