Merge pull request #7521 from delftswa2014/bugfix/cheatfix

Forgot shroud on all-cheat
This commit is contained in:
Oliver Brakmann
2015-02-25 23:35:00 +01:00

View File

@@ -68,34 +68,25 @@ namespace OpenRA.Traits
{
case "DevAll":
{
if (!EnableAll)
EnableAll ^= true;
AllTech = FastCharge = FastBuild = DisableShroud = UnlimitedPower = BuildAnywhere = EnableAll;
if (EnableAll)
{
AllTech = true;
FastCharge = true;
FastBuild = true;
DisableShroud = true;
self.Owner.Shroud.ExploreAll(self.World);
UnlimitedPower = true;
BuildAnywhere = true;
var amount = order.ExtraData != 0 ? (int)order.ExtraData : info.Cash;
self.Trait<PlayerResources>().GiveCash(amount);
EnableAll = true;
}
else
{
AllTech = false;
FastCharge = false;
FastBuild = false;
DisableShroud = false;
self.Owner.Shroud.ResetExploration();
UnlimitedPower = false;
BuildAnywhere = false;
EnableAll = false;
}
self.Owner.Shroud.Disabled = DisableShroud;
if (self.World.LocalPlayer == self.Owner)
self.World.RenderPlayer = DisableShroud ? null : self.Owner;
break;
}