Skip to content

Commit

Permalink
Temporarily limit how many factories can be assigned to commanders. (…
Browse files Browse the repository at this point in the history
…Hopefully fixes ticket Warzone2100#3521)

Later on, we'll need to figure out a way to program in the extra factory buttons so that they are displayed 5 per row.
  • Loading branch information
ShadowWolfTJC committed Dec 6, 2012
1 parent 660232d commit 392df9b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/intorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,15 +755,23 @@ bool intAddOrder(BASE_OBJECT *psObj)
OrderButtons[OrdIndex].AcNumButs = NumButs;

// Handle special case for factory -> command droid assignment buttons.
// For now, until we figure out how we're going to show more than 5 factory buttons for commanders to work with,
// we'll need to limit which factories can be assigned to them to just 5.
switch (OrderButtons[OrdIndex].Class) {
case ORDBUTCLASS_FACTORY:
NumButs = countAssignableFactories((UBYTE)selectedPlayer,FACTORY_FLAG);
if (NumButs > 5)
NumButs = 5;
break;
case ORDBUTCLASS_CYBORGFACTORY:
NumButs = countAssignableFactories((UBYTE)selectedPlayer,CYBORG_FLAG);
if (NumButs > 5)
NumButs = 5;
break;
case ORDBUTCLASS_VTOLFACTORY:
NumButs = countAssignableFactories((UBYTE)selectedPlayer,VTOL_FLAG);
if (NumButs > 5)
NumButs = 5;
break;
default:
break;
Expand Down

0 comments on commit 392df9b

Please sign in to comment.