msam polish -- contains some dirty hacks
This commit is contained in:
@@ -34,4 +34,25 @@ namespace OpenRA.Mods.RA.Render
|
||||
base.Tick(self);
|
||||
}
|
||||
}
|
||||
|
||||
/* todo: native elevation support on turrets, and this dies? */
|
||||
|
||||
class RenderUnitTurretedAimInfo : RenderUnitTurretedInfo
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new RenderUnitTurretedAim(init.self); }
|
||||
}
|
||||
|
||||
class RenderUnitTurretedAim : RenderUnitTurreted
|
||||
{
|
||||
public RenderUnitTurretedAim(Actor self)
|
||||
: base(self) { }
|
||||
|
||||
public override void Tick(Actor self)
|
||||
{
|
||||
var attack = self.TraitOrDefault<AttackBase>();
|
||||
var isAttacking = attack != null && attack.target.IsValid;
|
||||
anims["turret_0"].Animation.ReplaceAnim(isAttacking ? "aim" : "turret");
|
||||
base.Tick(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user