Add a screen-space offset to barrel positions, and fix HTNK firing offsets. Fixes #803, 929.

This commit is contained in:
Paul Chote
2011-06-25 15:25:22 +12:00
parent b64c5e001e
commit fc37733c3c
10 changed files with 33 additions and 30 deletions

View File

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