Add muzzleflash to GTWR. WithMuzzleFlash now actually uses the turret position.

This commit is contained in:
Paul Chote
2011-05-30 22:48:53 +12:00
parent 99611f66de
commit 9b858af2b7
5 changed files with 13 additions and 8 deletions

View File

@@ -219,7 +219,7 @@ namespace OpenRA.Mods.RA
var turretFacing = turreted != null ? turreted.turretFacing : facing.Facing;
return Util.RotateVectorByFacing(barrel.Position, turretFacing, .7f);
return GetTurretPosition(self, facing, turret) + Util.RotateVectorByFacing(barrel.Position, turretFacing, .7f);
}
public static bool IsInRange( float2 attackOrigin, float range, Actor target )

View File

@@ -120,7 +120,6 @@ namespace OpenRA.Mods.RA
target = target,
src = (self.CenterLocation
+ Combat.GetTurretPosition(self, facing, Turret)
+ Combat.GetBarrelPosition(self, facing, Turret, barrel)).ToInt2(),
srcAltitude = move != null ? move.Altitude : 0,
dest = target.CenterLocation,