diff --git a/Gameleap/code/mw4/Code/MW4/MW4Shell.cpp b/Gameleap/code/mw4/Code/MW4/MW4Shell.cpp index d261984c..e369322b 100644 --- a/Gameleap/code/mw4/Code/MW4/MW4Shell.cpp +++ b/Gameleap/code/mw4/Code/MW4/MW4Shell.cpp @@ -12930,10 +12930,12 @@ int __stdcall CTCL_GetAutoSlotMech(void* instance, int args, void* data[]) } // Returns int field for slot k ? data[0]=int k, data[1]=int field (0=Type 1=Team 2=Skin 3=Decal) +// field is passed as a script literal (0/1/2/3), so use VALUEPARM not INTPARM (literals are passed +// as (void*)N directly, not as pointers; INTPARM would dereference NULL for field=0 and crash). int __stdcall CTCL_GetAutoSlotInt(void* instance, int args, void* data[]) { int k = INTPARM(0); - int field = INTPARM(1); + int field = VALUEPARM(1); if (k < 0 || k >= 16) return 0; switch (field) { case 0: return g_aAutoSlots[k].nType; diff --git a/Gameleap/mw4/Content/ShellScripts/ConLobby.script b/Gameleap/mw4/Content/ShellScripts/ConLobby.script index 2ece1c52..64fc4d6e 100644 --- a/Gameleap/mw4/Content/ShellScripts/ConLobby.script +++ b/Gameleap/mw4/Content/ShellScripts/ConLobby.script @@ -1681,7 +1681,8 @@ main if callback($$CTCL_LoadAutoFile$$) { // Apply mission + game options via existing Rookie Mission flow - mail(MAIL_SET_ROOKIE_MISSION, @ConLobbyMission@) + if exists(@ConLobbyMission@) + mail(MAIL_SET_ROOKIE_MISSION, @ConLobbyMission@) // Clear all slots o_cam_list.nselected = 0 for (k = 0; k < nRosterCount; k++)