Animation facing -> WAngle.
This commit is contained in:
@@ -65,13 +65,14 @@ namespace OpenRA.Mods.Common.Projectiles
|
||||
this.info = info;
|
||||
this.args = args;
|
||||
pos = args.Source;
|
||||
var facing = WAngle.FromFacing(args.Facing);
|
||||
var convertedVelocity = new WVec(info.Velocity.Y, -info.Velocity.X, info.Velocity.Z);
|
||||
velocity = convertedVelocity.Rotate(WRot.FromFacing(args.Facing));
|
||||
velocity = convertedVelocity.Rotate(WRot.FromYaw(facing));
|
||||
acceleration = new WVec(info.Acceleration.Y, -info.Acceleration.X, info.Acceleration.Z);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Image))
|
||||
{
|
||||
anim = new Animation(args.SourceActor.World, info.Image, () => args.Facing);
|
||||
anim = new Animation(args.SourceActor.World, info.Image, () => facing);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.OpenSequence))
|
||||
anim.PlayThen(info.OpenSequence, () => anim.PlayRepeating(info.Sequences.Random(args.SourceActor.World.SharedRandom)));
|
||||
|
||||
Reference in New Issue
Block a user