Merge pull request #7323 from abcdefg30/devpower

Fix power decreasing while the dev hack is enabled.
This commit is contained in:
Taryn Hill
2015-01-12 10:02:59 -07:00

View File

@@ -72,11 +72,15 @@ namespace OpenRA.Mods.Common.Traits
int amount; int amount;
if (!powerDrain.TryGetValue(a, out amount)) if (!powerDrain.TryGetValue(a, out amount))
return; return;
powerDrain.Remove(a);
if (devMode.UnlimitedPower)
return;
if (amount > 0) if (amount > 0)
totalProvided -= amount; totalProvided -= amount;
else if (amount < 0) else if (amount < 0)
totalDrained += amount; totalDrained += amount;
powerDrain.Remove(a);
} }
int nextPowerAdviceTime = 0; int nextPowerAdviceTime = 0;