infantry squads; a bit tight at the moment.

This commit is contained in:
Chris Forbes
2009-11-01 13:15:23 +13:00
parent dbef9e4a45
commit 783b9e9f5f
8 changed files with 115 additions and 12 deletions

View File

@@ -2,6 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IjwFramework.Types;
using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
{
@@ -88,5 +90,11 @@ namespace OpenRa.Game.Traits
return (RotateVectorByFacing(new float2(offset[0], offset[1]), quantizedFacing, .7f) + GetRecoil(self, recoil));
}
public static Pair<Sprite, float2> Centered(Sprite s, float2 location)
{
var loc = location - 0.5f * s.size;
return Pair.New(s, loc.Round());
}
}
}