parent
a0f13ff73e
commit
f2ff7ead52
|
@ -4281,19 +4281,17 @@ void deleteTemplateFromProduction(DROID_TEMPLATE *psTemplate, unsigned player, Q
|
||||||
{
|
{
|
||||||
FACTORY *psFactory = &psStruct->pFunctionality->factory;
|
FACTORY *psFactory = &psStruct->pFunctionality->factory;
|
||||||
|
|
||||||
if (psFactory->psAssemblyPoint->factoryInc >= asProductionRun[psFactory->psAssemblyPoint->factoryType].size())
|
if (psFactory->psAssemblyPoint->factoryInc < asProductionRun[psFactory->psAssemblyPoint->factoryType].size())
|
||||||
{
|
{
|
||||||
continue; // No production run to check.
|
ProductionRun &productionRun = asProductionRun[psFactory->psAssemblyPoint->factoryType][psFactory->psAssemblyPoint->factoryInc];
|
||||||
}
|
for (unsigned inc = 0; inc < productionRun.size(); ++inc)
|
||||||
|
|
||||||
ProductionRun &productionRun = asProductionRun[psFactory->psAssemblyPoint->factoryType][psFactory->psAssemblyPoint->factoryInc];
|
|
||||||
for (unsigned inc = 0; inc < productionRun.size(); ++inc)
|
|
||||||
{
|
|
||||||
if (productionRun[inc].psTemplate->multiPlayerID == psTemplate->multiPlayerID && mode == ModeQueue)
|
|
||||||
{
|
{
|
||||||
//just need to erase this production run entry
|
if (productionRun[inc].psTemplate->multiPlayerID == psTemplate->multiPlayerID && mode == ModeQueue)
|
||||||
productionRun.erase(productionRun.begin() + inc);
|
{
|
||||||
--inc;
|
//just need to erase this production run entry
|
||||||
|
productionRun.erase(productionRun.begin() + inc);
|
||||||
|
--inc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue