Merged from revision: 7199

Fixes (by Buggler)
- Fixed town militia training bug after declining to train a new mobile militia squad upon completion
- Fixed income from facilities not properly added to cash balance

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7200 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-05-11 05:58:07 +00:00
parent de713b496d
commit 779a83f121
5 changed files with 49 additions and 25 deletions
+7 -1
View File
@@ -489,7 +489,10 @@ typedef struct
UINT8 ubHelicopterHoverTime;
UINT8 ubHelicopterTimeToFullRefuel;
UINT8 ubFiller[273]; //This structure should be 1588 bytes
// Buggler: New global variable that tracks money earned for facility use.
INT32 iTotalEarnedForFacilityOperationsToday;
UINT8 ubFiller[266]; //This structure should be 1588 bytes
} GENERAL_SAVE_INFO;
@@ -8197,6 +8200,7 @@ BOOLEAN SaveGeneralInfo( HWFILE hFile )
sGeneralInfo.fMikeShouldSayHi = gfMikeShouldSayHi;
// HEADROCK HAM 3.6: Save new global variable for facility costs
sGeneralInfo.iTotalEarnedForFacilityOperationsToday = giTotalEarnedForFacilityOperationsToday;
sGeneralInfo.iTotalOwedForFacilityOperationsToday = giTotalOwedForFacilityOperationsToday;
// HEADROCK HAM 3.6: Save Skyrider Costs Modifier
@@ -8471,6 +8475,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterSeriousRepairsSoFar, sizeof(sGeneralInfo.ubHelicopterSeriousRepairsSoFar), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterHoverTime, sizeof(sGeneralInfo.ubHelicopterHoverTime), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubHelicopterTimeToFullRefuel, sizeof(sGeneralInfo.ubHelicopterTimeToFullRefuel), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.iTotalEarnedForFacilityOperationsToday, sizeof(sGeneralInfo.iTotalEarnedForFacilityOperationsToday), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.ubFiller, sizeof(sGeneralInfo.ubFiller), sizeof(UINT8), numBytesRead);
} else {
numBytesRead = ReadFieldByField(hFile, &sGeneralInfo.HiddenNames, sizeof(sGeneralInfo.HiddenNames), sizeof(BOOLEAN), numBytesRead);
@@ -8753,6 +8758,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
gfMikeShouldSayHi = sGeneralInfo.fMikeShouldSayHi;
// HEADROCK HAM 3.6: Load new global variable for facility costs
giTotalEarnedForFacilityOperationsToday = sGeneralInfo.iTotalEarnedForFacilityOperationsToday;
giTotalOwedForFacilityOperationsToday = sGeneralInfo.iTotalOwedForFacilityOperationsToday;
// HEADROCK HAM 3.6: Load Skyrider Costs Modifier