NO THAT IS NOT WHAT YOU DO WITH USELESS CODE

This commit is contained in:
Chris Forbes
2010-05-14 08:16:33 +12:00
parent 43ad339ffe
commit 82c9c12cae
8 changed files with 13 additions and 39 deletions

View File

@@ -40,7 +40,6 @@ namespace OpenRA.Traits
muzzleFlash = new Animation(render.GetImage(self), () => unit.Facing);
muzzleFlash.Play("muzzle");
//var len = muzzleFlash.CurrentSequence.Length;
render.anims.Add("muzzle", new RenderSimple.AnimationWithOffset(
muzzleFlash,

View File

@@ -36,7 +36,6 @@ namespace OpenRA.Traits
public void Tick(Actor self)
{
//var info = self.Info.Traits.Get<ConquestVictoryConditionsInfo>();
var hasAnything = self.World.Queries.OwnedBy[self.Owner]
.WithTrait<MustBeDestroyed>().Any();

View File

@@ -32,17 +32,12 @@ namespace OpenRA.Traits
class RenderBuildingWall : RenderBuilding
{
string seqName;
int damageStates;
//Actor self;
int adjacentWalls = 0;
public RenderBuildingWall(Actor self)
: base(self)
{
seqName = "idle";
//this.self = self;
this.damageStates = self.Info.Traits.Get<RenderBuildingWallInfo>().DamageStates;
anim.PlayFetchIndex(seqName, () => adjacentWalls);
}
@@ -72,6 +67,8 @@ namespace OpenRA.Traits
var oldState = GetExtendedState(self, e.Damage);
var newState = GetExtendedState(self, 0);
var numStates = self.Info.Traits.Get<RenderBuildingWallInfo>().DamageStates;
if (oldState == newState) return;
switch (newState)
@@ -80,7 +77,7 @@ namespace OpenRA.Traits
seqName = "idle";
break;
case ExtendedDamageState.ThreeQuarter:
if (damageStates >= 4)
if (numStates >= 4)
seqName = "minor-damaged-idle";
break;
case ExtendedDamageState.Half:
@@ -88,7 +85,7 @@ namespace OpenRA.Traits
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound, self.CenterLocation);
break;
case ExtendedDamageState.Quarter:
if (damageStates >= 3)
if (numStates >= 3)
{
seqName = "critical-idle";
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound, self.CenterLocation);

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -44,7 +44,6 @@ namespace OpenRA.Traits
if (order.OrderString == "Enter")
{
//var res = order.TargetActor.traits.GetOrDefault<Reservable>();
var rp = order.TargetActor.traits.GetOrDefault<RallyPoint>();
self.CancelActivity();