Locate devmode code largely in the trait, reduce exploitability.

This commit is contained in:
alzeih
2010-07-26 14:58:23 +12:00
parent 10c7674433
commit 30241ddccc
7 changed files with 85 additions and 74 deletions

View File

@@ -69,7 +69,7 @@ namespace OpenRA.Traits
if (IsAvailable && (!Info.RequiresPower || IsPowered()))
{
if (self.traits.Get<DeveloperMode>().FastCharge) RemainingTime = 0;
if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.traits.Get<DeveloperMode>().FastCharge) RemainingTime = 0;
if (RemainingTime > 0) --RemainingTime;
if (!notifiedCharging)
{