Skip to content

Commit

Permalink
Fix SP bug that didn't set the limits correctly for the Cyborg Factor…
Browse files Browse the repository at this point in the history
…y, 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 d20fe58)

Conflicts:

	src/structure.c
  • Loading branch information
buginator committed Oct 19, 2010
1 parent f5b845a commit ec18ac9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/structure.c
Expand Up @@ -1588,6 +1588,14 @@ 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;
}
// Don't allow more than interface limits
if (asStructLimits[player][max].currentQuantity + 1 > asStructLimits[player][max].limit)
{
Expand Down

0 comments on commit ec18ac9

Please sign in to comment.