Fix missing asset files with ones from 5.0.7D

This commit is contained in:
2026-07-23 21:36:27 -05:00
parent 840bc96cc1
commit 5813aeb6e9
171 changed files with 425 additions and 308 deletions
+74
View File
@@ -158,6 +158,22 @@ int g_nWhyPaused = 0; // 0: not paused - invitation in menu-state, 1: briefing,
extern SCRIPTCALLBACK(CTCL_WhyPaused); extern SCRIPTCALLBACK(CTCL_WhyPaused);
int g_nTimeList_Index = 3; // 3rd item in listbox... int g_nTimeList_Index = 3; // 3rd item in listbox...
int g_nTimeList_Value = 7; // 7 minutes int g_nTimeList_Value = 7; // 7 minutes
// [RookieMission] options.ini overrides ? defaults match the hardcoded script values
char g_szRookieMission[256] = "ScarabStronghold - Attrition";
char* g_pszRookieMission = g_szRookieMission; // pointer used for script registration
int g_nRookieGameType = 2; // Attrition index in game-type list
int g_nRookieVisibility = 0; // 0=clear
int g_nRookieWeather = 0; // 0=off
int g_nRookieTimeOfDay = 0; // 0=day
int g_nRookieTimeLimit = -1; // -1=use g_nTimeList_Value
int g_nRookieRadar = 0; // 0=novice
int g_nRookieHeat = 0; // 0=off
int g_nRookieFriendlyFire= 0;
int g_nRookieSplash = 0;
int g_nRookieUnlimitedAmmo = 1; // 1=on (be cautious)
int g_nRookieWeaponJam = 0;
int g_nRookieAdvanceMode = 0;
int g_nRookieArmorMode = 0;
// MSL 5.06 // MSL 5.06
int g_nMechVariant = 0; int g_nMechVariant = 0;
int g_nMechLabOp = 0; int g_nMechLabOp = 0;
@@ -727,6 +743,21 @@ void MW4Shell::StartUp()
gosScript_RegisterCallback("CTCL_WhyPaused",&CTCL_WhyPaused,GOSVAR_INT,0,NULL); gosScript_RegisterCallback("CTCL_WhyPaused",&CTCL_WhyPaused,GOSVAR_INT,0,NULL);
gosScript_RegisterVariable("g_nTimeList_Index", &g_nTimeList_Index, GOSVAR_INT, 0, NULL); gosScript_RegisterVariable("g_nTimeList_Index", &g_nTimeList_Index, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nTimeList_Value", &g_nTimeList_Value, GOSVAR_INT, 0, NULL); gosScript_RegisterVariable("g_nTimeList_Value", &g_nTimeList_Value, GOSVAR_INT, 0, NULL);
// [RookieMission] ini-driven defaults
gosScript_RegisterVariable("g_szRookieMission", &g_pszRookieMission, GOSVAR_STRING, 0, NULL);
gosScript_RegisterVariable("g_nRookieGameType", &g_nRookieGameType, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieVisibility", &g_nRookieVisibility, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieWeather", &g_nRookieWeather, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieTimeOfDay", &g_nRookieTimeOfDay, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieTimeLimit", &g_nRookieTimeLimit, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieRadar", &g_nRookieRadar, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieHeat", &g_nRookieHeat, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieFriendlyFire",&g_nRookieFriendlyFire, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieSplash", &g_nRookieSplash, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieUnlimitedAmmo",&g_nRookieUnlimitedAmmo,GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieWeaponJam", &g_nRookieWeaponJam, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieAdvanceMode", &g_nRookieAdvanceMode, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nRookieArmorMode", &g_nRookieArmorMode, GOSVAR_INT, 0, NULL);
// MSL 5.06 // MSL 5.06
gosScript_RegisterVariable("g_nMechVariant", &g_nMechVariant, GOSVAR_INT, 0, NULL); gosScript_RegisterVariable("g_nMechVariant", &g_nMechVariant, GOSVAR_INT, 0, NULL);
gosScript_RegisterVariable("g_nMechLabOp", &g_nMechLabOp, GOSVAR_INT, 0, NULL); gosScript_RegisterVariable("g_nMechLabOp", &g_nMechLabOp, GOSVAR_INT, 0, NULL);
@@ -1108,6 +1139,21 @@ void MW4Shell::ShutDown()
// jcem - start // jcem - start
gosScript_UnregisterVariable("g_nTimeList_Value"); gosScript_UnregisterVariable("g_nTimeList_Value");
gosScript_UnregisterVariable("g_nTimeList_Index"); gosScript_UnregisterVariable("g_nTimeList_Index");
// [RookieMission] globals
gosScript_UnregisterVariable("g_szRookieMission");
gosScript_UnregisterVariable("g_nRookieGameType");
gosScript_UnregisterVariable("g_nRookieVisibility");
gosScript_UnregisterVariable("g_nRookieWeather");
gosScript_UnregisterVariable("g_nRookieTimeOfDay");
gosScript_UnregisterVariable("g_nRookieTimeLimit");
gosScript_UnregisterVariable("g_nRookieRadar");
gosScript_UnregisterVariable("g_nRookieHeat");
gosScript_UnregisterVariable("g_nRookieFriendlyFire");
gosScript_UnregisterVariable("g_nRookieSplash");
gosScript_UnregisterVariable("g_nRookieUnlimitedAmmo");
gosScript_UnregisterVariable("g_nRookieWeaponJam");
gosScript_UnregisterVariable("g_nRookieAdvanceMode");
gosScript_UnregisterVariable("g_nRookieArmorMode");
// MSL 5.06 // MSL 5.06
gosScript_UnregisterVariable("g_nBlackMech"); gosScript_UnregisterVariable("g_nBlackMech");
gosScript_UnregisterVariable("g_nMechVariant"); gosScript_UnregisterVariable("g_nMechVariant");
@@ -12732,6 +12778,34 @@ int __stdcall CTCL_SetCDSP(void* instance, int args, void* data[])
{ {
ASSERT(CTCL_IsConsole()); ASSERT(CTCL_IsConsole());
CTCL_DefaultHostSetup(1); CTCL_DefaultHostSetup(1);
// Read [RookieMission] section from options.ini and populate script globals.
// Missing keys leave globals at their initialised defaults (backward-compatible).
{
NotationFile options_ini("options.ini", NotationFile::Standard, true);
Page *page = options_ini.FindPage("RookieMission");
if (page)
{
const char *sz = NULL;
if (page->GetEntry("MissionName", &sz) && sz)
{
strncpy(g_szRookieMission, sz, sizeof(g_szRookieMission) - 1);
g_szRookieMission[sizeof(g_szRookieMission) - 1] = '\0';
}
page->GetEntry("GameType", &g_nRookieGameType);
page->GetEntry("Visibility", &g_nRookieVisibility);
page->GetEntry("Weather", &g_nRookieWeather);
page->GetEntry("TimeOfDay", &g_nRookieTimeOfDay);
page->GetEntry("TimeLimit", &g_nRookieTimeLimit);
page->GetEntry("Radar", &g_nRookieRadar);
page->GetEntry("HeatOn", &g_nRookieHeat);
page->GetEntry("FriendlyFire", &g_nRookieFriendlyFire);
page->GetEntry("SplashDamage", &g_nRookieSplash);
page->GetEntry("UnlimitedAmmo", &g_nRookieUnlimitedAmmo);
page->GetEntry("WeaponJam", &g_nRookieWeaponJam);
page->GetEntry("AdvanceMode", &g_nRookieAdvanceMode);
page->GetEntry("ArmorMode", &g_nRookieArmorMode);
}
}
return 0; return 0;
} }
@@ -806,7 +806,7 @@ STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_ML_CH_ACCELERATION "Acceleration (Meters/Sec.):" IDS_ML_CH_ACCELERATION "Acceleration (Meters/Sec.):"
IDS_ML_CH_DECELERATION "Deceleration (Meters/Sec.):" IDS_ML_CH_DECELERATION "Deceleration (Meters/Sec.):"
IDS_ML_CH_TURNRATE "Turn Rate (Degrees/Sec.):" IDS_ML_CH_TURNRATE "Turn Rate (Top Speed Rad/Sec):"
IDS_ML_CH_TWISTRANGE "Torso Twist Range (Degrees):" IDS_ML_CH_TWISTRANGE "Torso Twist Range (Degrees):"
IDS_ML_CH_TWISTSPEED "Torso Twist Speed (Degrees/Sec.):" IDS_ML_CH_TWISTSPEED "Torso Twist Speed (Degrees/Sec.):"
IDS_ML_CH_NEWMECH "NEW 'MECH" IDS_ML_CH_NEWMECH "NEW 'MECH"
@@ -793,15 +793,15 @@ main
if (getmessage() == MAIL_SET_ROOKIE_MISSION) // set rookie, see conlobby.script if (getmessage() == MAIL_SET_ROOKIE_MISSION) // set rookie, see conlobby.script
{ {
// caution: actually 0 is not correct but who care? ^^ // caution: actually 0 is not correct but who care? ^^
if (o_game_options[0].nselected != 2) if (o_game_options[0].nselected != $$g_nRookieGameType$$)
{ {
o_game_options[0].nselected = 2 o_game_options[0].nselected = $$g_nRookieGameType$$
mail(MAIL_SET_ROOKIE_MISSION, this) mail(MAIL_SET_ROOKIE_MISSION, this)
} }
// find mission: // find mission:
for k = 0; k < o_game_options[1].list_size; k++ for k = 0; k < o_game_options[1].list_size; k++
{ {
if equal$(o_game_options[1].list_item[k], ROOKIE_MISSION) if equal$(o_game_options[1].list_item[k], $$g_szRookieMission$$)
{ {
// found mission // found mission
break break
@@ -855,24 +855,26 @@ main
else else
{ {
// visibility // visibility
o_game_options[2].nselected = 0 // Default o_game_options[2].nselected = $$g_nRookieVisibility$$ // [RookieMission] ini
callback($$SetNetworkMissionParamater$$, visibility, o_game_options[2].nselected) callback($$SetNetworkMissionParamater$$, visibility, o_game_options[2].nselected)
// weather // weather
o_game_options[3].nselected = 0 // off o_game_options[3].nselected = $$g_nRookieWeather$$ // [RookieMission] ini
callback($$SetNetworkMissionParamater$$, weather, o_game_options[3].nselected) callback($$SetNetworkMissionParamater$$, weather, o_game_options[3].nselected)
// time of day // time of day
o_game_options[4].nselected = 0 o_game_options[4].nselected = $$g_nRookieTimeOfDay$$ // [RookieMission] ini
callback($$SetNetworkMissionParamater$$, night_parameter, o_game_options[4].nselected) callback($$SetNetworkMissionParamater$$, night_parameter, o_game_options[4].nselected)
callback($$Shell_CallbackHandler$$, ShellSetTime, o_game_options[4].nselected) callback($$Shell_CallbackHandler$$, ShellSetTime, o_game_options[4].nselected)
} }
// time limit - use ini override if set, else TIME_VALUE_DEFAULT
// time limit if $$g_nRookieTimeLimit$$ >= 0
temp_num = $$g_nRookieTimeLimit$$ // [RookieMission] ini
else
temp_num = TIME_VALUE_DEFAULT
for k = 0; k < o_game_options[5].list_size; k++ for k = 0; k < o_game_options[5].list_size; k++
{ {
temp_num = makeint(o_game_options[5].list_item[k]) if (makeint(o_game_options[5].list_item[k]) == temp_num)
if (temp_num == TIME_VALUE_DEFAULT)
{ {
o_game_options[5].nselected = k o_game_options[5].nselected = k
break break
@@ -935,31 +937,31 @@ main
{ {
// radar // radar
nTempParam = radar nTempParam = radar
nTempValue = 0 // Novice nTempValue = $$g_nRookieRadar$$ // [RookieMission] ini (0=Novice)
o_game_options[6].nselected = nTempValue o_game_options[6].nselected = nTempValue
callback($$SetNetworkMissionParamater$$, nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$, nTempParam, nTempValue)
// heat management // heat management
nTempParam = HEAT_PARAMETER nTempParam = HEAT_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieHeat$$ // [RookieMission] ini
o_game_options[7].state = 0 o_game_options[7].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
// friendly fire // friendly fire
nTempParam = FRIENDLY_FIRE_PERCENTGE_PARAMETER nTempParam = FRIENDLY_FIRE_PERCENTGE_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieFriendlyFire$$ // [RookieMission] ini
o_game_options[8].state = 0 o_game_options[8].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
// splash // splash
nTempParam = SPLASH_ON_PARAMETER nTempParam = SPLASH_ON_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieSplash$$ // [RookieMission] ini
o_game_options[9].state = 0 o_game_options[9].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
// unlimited ammo // unlimited ammo
nTempParam = UNLIMITED_AMMO_PARAMETER nTempParam = UNLIMITED_AMMO_PARAMETER
nTempValue = 1 // be cautious nTempValue = $$g_nRookieUnlimitedAmmo$$ // [RookieMission] ini
o_game_options[10].state = 0 o_game_options[10].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
@@ -975,7 +977,7 @@ main
// weapon jam // weapon jam
nTempParam = WEAPON_JAM_PARAMETER nTempParam = WEAPON_JAM_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieWeaponJam$$ // [RookieMission] ini
o_game_options[14].state = 0 o_game_options[14].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
@@ -987,13 +989,13 @@ main
// advance mode // advance mode
nTempParam = ADVANCE_MODE_PARAMETER nTempParam = ADVANCE_MODE_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieAdvanceMode$$ // [RookieMission] ini
o_game_options[15].state = 0 o_game_options[15].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
// armor mode // armor mode
nTempParam = ARMOR_MODE_PARAMETER nTempParam = ARMOR_MODE_PARAMETER
nTempValue = 0 nTempValue = $$g_nRookieArmorMode$$ // [RookieMission] ini
o_game_options[16].state = 0 o_game_options[16].state = 0
callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue) callback($$SetNetworkMissionParamater$$,nTempParam, nTempValue)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More