Skip to content

Commit

Permalink
Do not halt factory production assigned to commanders in skirmish on …
Browse files Browse the repository at this point in the history
…commander limit, or for VTOLs.

Since unlimited VTOLs can be assigned to commanders, do not halt production of them.
Since .psCommander is not synchronised, do not depend on it in synchronised code in skirmish.

Fixes ticket:2138.
  • Loading branch information
Cyp committed Sep 20, 2012
1 parent 5600178 commit 0773a9f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/structure.cpp
Expand Up @@ -2525,13 +2525,19 @@ static bool structPlaceDroid(STRUCTURE *psStructure, DROID_TEMPLATE *psTempl,

static bool IsFactoryCommanderGroupFull(const FACTORY* psFactory)
{
if (bMultiPlayer)
{
// TODO: Synchronise .psCommander. Have to return false here, to avoid desynch.
return false;
}

unsigned int DroidsInGroup;

// If we don't have a commander return false (group not full)
if (psFactory->psCommander==NULL) return false;

// allow any number of IDF droids
if (templateIsIDF((DROID_TEMPLATE *)psFactory->psSubject))
if (templateIsIDF(psFactory->psSubject) || asPropulsionStats[psFactory->psSubject->asParts[COMP_PROPULSION]].propulsionType == PROPULSION_TYPE_LIFT)
{
return false;
}
Expand Down

0 comments on commit 0773a9f

Please sign in to comment.