msam polish -- contains some dirty hacks
This commit is contained in:
@@ -33,6 +33,8 @@ namespace OpenRA.Mods.RA
|
||||
public readonly bool MuzzleFlash = false;
|
||||
public readonly int FireDelay = 0;
|
||||
|
||||
public readonly bool AlignIdleTurrets = false;
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
|
||||
}
|
||||
|
||||
@@ -218,7 +220,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
if (order.TargetActor != null)
|
||||
w.Add(new FlashTarget(order.TargetActor));
|
||||
|
||||
|
||||
var line = self.TraitOrDefault<DrawLineToTarget>();
|
||||
if (line != null)
|
||||
if (order.TargetActor != null) line.SetTarget(self, Target.FromOrder(order), Color.Red);
|
||||
@@ -226,7 +228,13 @@ namespace OpenRA.Mods.RA
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
target = Target.None;
|
||||
|
||||
/* hack */
|
||||
if (self.HasTrait<Turreted>() && self.Info.Traits.Get<AttackBaseInfo>().AlignIdleTurrets)
|
||||
self.Trait<Turreted>().desiredFacing = null;
|
||||
}
|
||||
}
|
||||
|
||||
public string CursorForOrder(Actor self, Order order)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
<!-- Rocket Launcher -->
|
||||
<unit name="msam">
|
||||
<sequence name="idle" start="0" facings="32" />
|
||||
<sequence name="turret-2" start="32" facings="32" />
|
||||
<sequence name="turret" start="64" facings="32" /> <!-- hack -->
|
||||
<sequence name="turret" start="32" facings="32" />
|
||||
<sequence name="aim" start="64" facings="32" /> <!-- hack -->
|
||||
<sequence name="turret-3" start="64" facings="32" />
|
||||
</unit>
|
||||
<!-- SSM Launcher -->
|
||||
|
||||
@@ -330,11 +330,12 @@ MSAM:
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: 227mm
|
||||
SecondaryWeapon: 227mm
|
||||
PrimaryOffset: 0,5,0,-1
|
||||
PrimaryOffset: 0,5,0,-2
|
||||
PrimaryLocalOffset: -4,0,0
|
||||
SecondaryLocalOffset: 4,0,0
|
||||
Recoil: 0
|
||||
RenderUnitTurreted:
|
||||
AlignIdleTurrets: true
|
||||
RenderUnitTurretedAim:
|
||||
AutoTarget:
|
||||
LeavesHusk:
|
||||
HuskActor: MSAM.Husk
|
||||
|
||||
Reference in New Issue
Block a user