reuse CenterOfCell

This commit is contained in:
Chris Forbes
2009-12-08 20:21:24 +13:00
parent 4528ee4910
commit 073cdc202d
5 changed files with 22 additions and 22 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenRa.Game
BuildingInfluence = new BuildingInfluenceMap();
UnitInfluence = new UnitInfluenceMap();
foreach (TreeReference treeReference in Rules.Map.Trees)
foreach (var treeReference in Rules.Map.Trees)
world.Add(new Actor(Rules.UnitInfo[treeReference.Image],
new int2(treeReference.Location),
null));
@@ -104,7 +104,7 @@ namespace OpenRa.Game
foreach (var s in toLoad)
{
//num=owner,type,health,location,facing,action,trigger
//num=owner,type,health,location,facing,...
var parts = s.Value.Split( ',' );
var loc = int.Parse(parts[3]);
world.Add(new Actor(Rules.UnitInfo[parts[1].ToLowerInvariant()], new int2(loc % 128, loc / 128),