Fix: The invisible troops fix from r8131 caused defending troops to be handled as reinforcements and appear at the map border instead of the pre-defined positions across the map. This was caused by unpausing the game before the troops had been placed. This revision fixes that and hopefully doesn't break anything else.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8162 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2016-04-18 21:21:53 +00:00
parent 26db62bd19
commit 14ccc1193b
3 changed files with 13 additions and 10 deletions
+4
View File
@@ -642,6 +642,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
}
ValidateEnemiesHaveWeapons();
UnPauseGame();
return ( ( BOOLEAN) ( gpBattleGroup->ubGroupSize > 0 ) );
}
@@ -772,6 +773,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
return FALSE;
AddSoldierInitListEnemyDefenceSoldiers( ubTotalAdmins, ubTotalTroops, ubTotalElites, ubTotalTanks, ubTotalJeeps );
ValidateEnemiesHaveWeapons();
UnPauseGame();
return TRUE;
}
#endif
@@ -1029,6 +1031,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
}
ValidateEnemiesHaveWeapons();
UnPauseGame();
return TRUE;
}
@@ -1059,6 +1062,7 @@ BOOLEAN PrepareEnemyForUndergroundBattle()
pUnderground->ubJeepsInBattle += ubTotalJeeps;
AddSoldierInitListEnemyDefenceSoldiers( pUnderground->ubNumAdmins, pUnderground->ubNumTroops, pUnderground->ubNumElites, pUnderground->ubNumTanks, pUnderground->ubNumJeeps );
ValidateEnemiesHaveWeapons();
UnPauseGame();
}
return ((BOOLEAN)(pUnderground->ubNumAdmins + pUnderground->ubNumTroops + pUnderground->ubNumElites + pUnderground->ubNumTanks + pUnderground->ubNumJeeps > 0));
}