Fix most of the x/y issues

This commit is contained in:
Paul Chote
2010-04-01 20:57:53 +13:00
committed by Bob
parent f7e2f414c0
commit b8702e494b
20 changed files with 150 additions and 157 deletions

View File

@@ -179,8 +179,9 @@ namespace OpenRA
static int2 ClampToWorld( this World world, int2 xy )
{
var mapStart = world.Map.Offset;
var mapEnd = world.Map.Offset + world.Map.Size;
var mapStart = world.Map.TopLeft;
// TODO: Revist this and fix properly
var mapEnd = world.Map.BottomRight;
if( xy.X < mapStart.X )
xy.X = mapStart.X;
if( xy.X > mapEnd.X )