mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Changing MAX_NUMBER_PLAYER_MERCS midgame no longer renders savegames unloadable, as the teamsize is stored in the savegame anyway
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6294 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+16
-7
@@ -6988,16 +6988,25 @@ BOOLEAN LoadTacticalStatusFromSavedGame( HWFILE hFile )
|
||||
errMsgTxt[4] = Additional113Text[6];
|
||||
|
||||
bool needToRejigger = false;
|
||||
for (int idx = OUR_TEAM; idx <= CIV_TEAM; ++idx) {
|
||||
if ((cntFromFile[ idx ] > cntFromIni[ idx ]) || ((cntFromFile[ idx ] < cntFromIni[ idx ]) && (idx == OUR_TEAM))) {
|
||||
CHAR16 errorMessage[512];
|
||||
for (int idx = OUR_TEAM; idx <= CIV_TEAM; ++idx)
|
||||
{
|
||||
// Flugente: for OUR_TEAM, from no on we use (gTacticalStatus.Team[ OUR_TEAM ].bLastID - gTacticalStatus.Team[ OUR_TEAM ].bFirstID + 1) instead of
|
||||
// gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs + gGameExternalOptions.ubGameMaximumNumberOfPlayerVehicles (defined in OUR_TEAM_SIZE_NO_VEHICLE).
|
||||
// As a result, this check isn't needed anymore, as the number stays fixed (it always stayed fixed, as one couldn't continue the game if one altered it,
|
||||
// which raises the question of why we even checked that...)
|
||||
/*if ((cntFromFile[ idx ] > cntFromIni[ idx ]) || ((cntFromFile[ idx ] < cntFromIni[ idx ]) && (idx == OUR_TEAM)))
|
||||
{
|
||||
CHAR16 errorMessage[512];
|
||||
swprintf(errorMessage, Additional113Text[1], errMsgTxt [ idx ], cntFromFile[ idx ], cntFromIni[ idx ]);
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
} else if (cntFromFile[ idx ] < cntFromIni[ idx ]) {
|
||||
DoScreenIndependantMessageBox(errorMessage, MSG_BOX_FLAG_OK, FailedLoadingGameCallBack );
|
||||
return FALSE;
|
||||
}
|
||||
else*/ if (idx != OUR_TEAM && cntFromFile[ idx ] < cntFromIni[ idx ])
|
||||
{
|
||||
needToRejigger = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needToRejigger) {
|
||||
// The .ini file asked for more slots than were in the save file, so expand the slots
|
||||
for (int teamIdx = OUR_TEAM; teamIdx <= CIV_TEAM; ++teamIdx) {
|
||||
|
||||
Reference in New Issue
Block a user