Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Do not halt factory production assigned to commanders in skirmish on …

…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...
commit 0773a9ff6cfc344def015f349e39fa62d09fe697 1 parent 5600178
Cyp authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  src/structure.cpp
8  src/structure.cpp
@@ -2525,13 +2525,19 @@ static bool structPlaceDroid(STRUCTURE *psStructure, DROID_TEMPLATE *psTempl,
2525 2525
 
2526 2526
 static bool IsFactoryCommanderGroupFull(const FACTORY* psFactory)
2527 2527
 {
  2528
+	if (bMultiPlayer)
  2529
+	{
  2530
+		// TODO: Synchronise .psCommander. Have to return false here, to avoid desynch.
  2531
+		return false;
  2532
+	}
  2533
+
2528 2534
 	unsigned int DroidsInGroup;
2529 2535
 
2530 2536
 	// If we don't have a commander return false (group not full)
2531 2537
 	if (psFactory->psCommander==NULL) return false;
2532 2538
 
2533 2539
 	// allow any number of IDF droids
2534  
-	if (templateIsIDF((DROID_TEMPLATE *)psFactory->psSubject))
  2540
+	if (templateIsIDF(psFactory->psSubject) || asPropulsionStats[psFactory->psSubject->asParts[COMP_PROPULSION]].propulsionType == PROPULSION_TYPE_LIFT)
2535 2541
 	{
2536 2542
 		return false;
2537 2543
 	}

0 notes on commit 0773a9f

Please sign in to comment.
Something went wrong with that request. Please try again.