Skip to content
Browse files

Fix cyborg and transport production - for these only check availabili…

…ty of their bodies,

not anything else.
  • Loading branch information...
1 parent 4e66209 commit 95bdafdffb78826b217860356d7ee546654d67b4 @perim perim committed Dec 18, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/template.cpp
View
13 src/template.cpp
@@ -60,6 +60,19 @@ static const StringToEnum<DROID_TYPE> map_DROID_TYPE[] =
bool researchedTemplate(DROID_TEMPLATE *psCurr, int player)
{
+ // super hack -- cyborgs and transports are special, only check their body
+ switch (psCurr->droidType)
+ {
+ case DROID_PERSON:
+ case DROID_CYBORG:
+ case DROID_CYBORG_SUPER:
+ case DROID_CYBORG_CONSTRUCT:
+ case DROID_CYBORG_REPAIR:
+ case DROID_TRANSPORTER:
+ return (apCompLists[player][COMP_BODY][psCurr->asParts[COMP_BODY]] == AVAILABLE);
+ default:
+ break; // now proceed to normal droids...
+ }
// Note the ugly special case for commanders - their weapon is unavailable
if (apCompLists[player][COMP_BODY][psCurr->asParts[COMP_BODY]] != AVAILABLE
|| (psCurr->asParts[COMP_BRAIN] > 0 && apCompLists[player][COMP_BRAIN][psCurr->asParts[COMP_BRAIN]] != AVAILABLE)

0 comments on commit 95bdafd

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