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