Skip to content

Commit

Permalink
Remove the rule that you get the cost of a power generator back when …
Browse files Browse the repository at this point in the history
…it is destroyed. This was exploitable, and made no sense.
  • Loading branch information
perim committed Dec 16, 2011
1 parent c52b548 commit 7b66301
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/structure.cpp
Expand Up @@ -4834,18 +4834,6 @@ bool destroyStruct(STRUCTURE *psDel)
tileSetFire(psDel->pos.x, psDel->pos.y, burnDurationOther);
}

// Power generators give back their power when destroyed.
if (psDel->pStructureType->type == REF_POWER_GEN)
{
// Give some power back to the player, whether or not the power generator is visible.
addPower(psDel->player, structPowerToBuild(psDel));
// If it had a module attached, need to add the power for the base struct as well, whether or not the power generator is visible.
if (psDel->pFunctionality->powerGenerator.capacity)
{
addPower(psDel->player, psDel->pStructureType->powerToBuild);
}
}

resourceFound = removeStruct(psDel, true);

// Leave burn marks in the ground where building once stood
Expand Down

0 comments on commit 7b66301

Please sign in to comment.