move initial facing of missile onto AttackBase in prep for fixing 4tnk

This commit is contained in:
Chris Forbes
2010-01-08 10:25:37 +13:00
parent 538cb9421d
commit 8ed8dad4a9
2 changed files with 6 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRa.Game.Effects
int Altitude;
public Missile(string weapon, Player owner, Actor firedBy,
int2 src, Actor target, int altitude)
int2 src, Actor target, int altitude, int facing)
{
Weapon = Rules.WeaponInfo[weapon];
Projectile = Rules.ProjectileInfo[Weapon.Projectile];
@@ -31,9 +31,7 @@ namespace OpenRa.Game.Effects
Target = target;
Pos = src.ToFloat2();
Altitude = altitude;
/* todo: initial facing should be turret facing, or unit facing if we're not turreted */
Facing = Traits.Util.GetFacing( Target.CenterLocation - src.ToFloat2(), 0 );
Facing = facing;
if (Projectile.Image != null && Projectile.Image != "none")
{