Vanilla-Conquer
Vanilla-Conquer copied to clipboard
[VanillaRA] Aftermath units in Skirmish mode are always disabled
Being unsure of it being an issue or my limited knowledge, I started it as a discussion here: https://github.com/TheAssemblyArmada/Vanilla-Conquer/discussions/923 But my conclusion is, that this is indeed an "issue".
My testing shows that this bit of code prevents NewUnitsEnabled to remain at 1. scenario.cpp, line 2636:
#ifdef FIXIT_CSII // checked - ajw 9/28/98 - Added runtime check.
if (Is_Aftermath_Installed()) {
if (Session.Type == GAME_SKIRMISH || Session.Type == GAME_GLYPHX_MULTIPLAYER) {
bAftermathMultiplayer = NewUnitsEnabled = OverrideNewUnitsEnabled;
}
}
#endif
In globals.cpp there is this: OverrideNewUnitsEnabled = false; // ST - 12/13/2019 12:21PM and it seems only the remaster dllinterface.cpp has the code to make it become "true". While the non-remaster build has no such means. Non-remaster builds should not use "OverrideNewUnitsEnabled" there, in scenario.cpp.
Made a local VanillaRA build with this adjusted code (scenario.cpp, line 2636):
#ifdef FIXIT_CSII // checked - ajw 9/28/98 - Added runtime check.
if (Is_Aftermath_Installed()) {
if (Session.Type == GAME_SKIRMISH || Session.Type == GAME_GLYPHX_MULTIPLAYER) {
#ifdef REMASTER_BUILD
bAftermathMultiplayer = NewUnitsEnabled = OverrideNewUnitsEnabled;
#else
bAftermathMultiplayer = NewUnitsEnabled;
#endif
}
}
#endif
Now I can toggle the Skirmish game Aftermath-unit availability from within the "Aftrmath.ini" file:
[Aftermath]
NewUnitsEnabled=1