Load File: hide button when automaticmode!=1; fix team/skin double-click
1. Expose g_bAutomaticMode as gosScript variable so ConLobby can check it at init time. o_load_file.state is set to 3 (disabled/hidden) if automaticmode != 1 in options.ini. Button is fully visible and active only when the feature is intentionally enabled. Rebuild required: MW4.exe (Release + Profile). 2. Remove cur_team_val conditional for team/skin slot assignment. Previously, only one of o_team[k] or o_skins[k] was set depending on cur_team_val at click time, but MAIL_SET_ROOKIE_MISSION propagates the new game type asynchronously -- cur_team_val would not reflect the file's GameType until the next frame, requiring a second click. Fix: always set both o_team[k] and o_skins[k] unconditionally. The mission launch code uses whichever is relevant for the active mode; the other is harmlessly ignored. No rebuild (script-only).
This commit is contained in:
@@ -1238,6 +1238,8 @@ main
|
||||
o_load_file.location = 467, 510, o_frame.location.z + 1
|
||||
o_load_file.state = 0 // initially enabled
|
||||
initialize(o_load_file)
|
||||
if ($$g_bAutomaticMode$$ != 1)
|
||||
o_load_file.state = 3 // hide when automaticmode is not active
|
||||
|
||||
// MSL Added default settings button
|
||||
object o_default = s_multistatepane
|
||||
@@ -1747,10 +1749,12 @@ main
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if cur_team_val > 0
|
||||
o_team[k].nselected = callback($$CTCL_GetAutoSlotInt$$, k, 1)
|
||||
else
|
||||
o_skins[k].nselected = callback($$CTCL_GetAutoSlotInt$$, k, 2)
|
||||
// Always set both team and skin unconditionally.
|
||||
// The game type may not have propagated to cur_team_val yet
|
||||
// (MAIL_SET_ROOKIE_MISSION is async); setting both is safe --
|
||||
// the launch code uses whichever is correct for the active mode.
|
||||
o_team[k].nselected = callback($$CTCL_GetAutoSlotInt$$, k, 1)
|
||||
o_skins[k].nselected = callback($$CTCL_GetAutoSlotInt$$, k, 2)
|
||||
o_decal[k].nselected = callback($$CTCL_GetAutoSlotInt$$, k, 3)
|
||||
initialize(o_mech_variant[k])
|
||||
if (ROSTER_top_of_list <= k) && (k < ROSTER_top_of_list + ROSTER_DISPLAY_COUNT)
|
||||
|
||||
Reference in New Issue
Block a user