mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: ASD update function not periodicaly called. This bug only exists in campaigns started before r8015.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8233 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-1
@@ -21,6 +21,7 @@ extern CHAR16 zTrackingNumber[16];
|
||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||
// you will invalidate the saved game file
|
||||
|
||||
#define ASD_INIT_FIX 168 // Flugente: fix for ASD feature introduced with ENEMY_HELICOPTERS
|
||||
#define NONPROFILE_MERCHANTS 167 // Flugente: merchants can be created from non-profile NPCs
|
||||
#define INDIVIDUAL_MILITIA 166 // Flugente: individual militia
|
||||
#define ENEMY_JEEPS 165 // Flugente: enemy jeeps
|
||||
@@ -86,7 +87,7 @@ extern CHAR16 zTrackingNumber[16];
|
||||
#define AP100_SAVEGAME_DATATYPE_CHANGE 105 // Before this, we didn't have the 100AP structure changes
|
||||
#define NIV_SAVEGAME_DATATYPE_CHANGE 102 // Before this, we used the old structure system
|
||||
|
||||
#define SAVE_GAME_VERSION NONPROFILE_MERCHANTS
|
||||
#define SAVE_GAME_VERSION ASD_INIT_FIX
|
||||
|
||||
//#define RUSSIANGOLD
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6158,6 +6158,15 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
|
||||
InitASD();
|
||||
}
|
||||
|
||||
// Flugente: in campaigns started before ENEMY_HELICOPTERS, the periodic ASD update routine was not properly initialised. To be sure, we definetly set it up here
|
||||
if ( guiCurrentSaveGameVersion < ASD_INIT_FIX )
|
||||
{
|
||||
// Flugente: if this a savegame from an older version where ASD didn't exist, we have to manually add the periodic event
|
||||
DeleteAllStrategicEventsOfType( EVENT_ASD_UPDATE );
|
||||
|
||||
AddPeriodStrategicEvent( EVENT_ASD_UPDATE, 90, 0 );
|
||||
}
|
||||
|
||||
if ( guiCurrentSaveGameVersion >= INDIVIDUAL_MILITIA )
|
||||
{
|
||||
uiRelEndPerc += 1;
|
||||
|
||||
Reference in New Issue
Block a user