Fix SP bug that didn't set the limits correctly for the Cyborg Factory, it really should be fixed in the scripts, however, this will not harm anything, just note that the current limit is MAX_FACTORY which is currently 5.

This will *not* fix savegames that already went past the limit!

NOTE: Our next release after 2.3.5 will have it fixed in the scripts.

refs ticket:2173

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11697 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit d20fe58222bc883f8be849965217d6245d03cf72)
master
Buginator 2010-09-19 16:46:58 +00:00 committed by buginator
parent 999a755650
commit a111835199
1 changed files with 9 additions and 0 deletions

View File

@ -1629,6 +1629,15 @@ STRUCTURE* buildStructureDir(STRUCTURE_STATS *pStructureType, UDWORD x, UDWORD y
ASSERT_OR_RETURN(NULL, max <= numStructureStats, "Invalid structure type");
if (!strcmp(pStructureType->pName, "A0CyborgFactory") && player == 0 && !bMultiPlayer)
{
// HACK: correcting SP bug, needs fixing in script(!!) (only applies for player 0)
// should be OK for Skirmish/MP games, since that is set correctly.
// scrSetStructureLimits() is called by scripts to set this normally.
asStructLimits[player][max].limit = MAX_FACTORY;
asStructLimits[player][max].globalLimit = MAX_FACTORY;
}
if (!strcmp(pStructureType->pName, "A0CyborgFactory") && player == 0 && !bMultiPlayer)
{
// HACK: correcting SP bug, needs fixing in script(!!) (only applies for player 0)