Fix missing asset files with ones from 5.0.7D
This commit is contained in:
@@ -158,6 +158,22 @@ int g_nWhyPaused = 0; // 0: not paused - invitation in menu-state, 1: briefing,
|
||||
extern SCRIPTCALLBACK(CTCL_WhyPaused);
|
||||
int g_nTimeList_Index = 3; // 3rd item in listbox...
|
||||
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
|
||||
int g_nMechVariant = 0;
|
||||
int g_nMechLabOp = 0;
|
||||
@@ -727,6 +743,21 @@ void MW4Shell::StartUp()
|
||||
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_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
|
||||
gosScript_RegisterVariable("g_nMechVariant", &g_nMechVariant, GOSVAR_INT, 0, NULL);
|
||||
gosScript_RegisterVariable("g_nMechLabOp", &g_nMechLabOp, GOSVAR_INT, 0, NULL);
|
||||
@@ -1108,6 +1139,21 @@ void MW4Shell::ShutDown()
|
||||
// jcem - start
|
||||
gosScript_UnregisterVariable("g_nTimeList_Value");
|
||||
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
|
||||
gosScript_UnregisterVariable("g_nBlackMech");
|
||||
gosScript_UnregisterVariable("g_nMechVariant");
|
||||
@@ -12732,6 +12778,34 @@ int __stdcall CTCL_SetCDSP(void* instance, int args, void* data[])
|
||||
{
|
||||
ASSERT(CTCL_IsConsole());
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -806,7 +806,7 @@ STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ML_CH_ACCELERATION "Acceleration (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_TWISTSPEED "Torso Twist Speed (Degrees/Sec.):"
|
||||
IDS_ML_CH_NEWMECH "NEW 'MECH"
|
||||
|
||||
Reference in New Issue
Block a user