This commit is contained in:
Bob
2009-12-05 21:20:32 +13:00
parent 74b7d21d4b
commit 9e2ecb70be

View File

@@ -106,9 +106,9 @@ namespace OpenRa.Game
foreach (var s in mapfile.GetSection("STRUCTURES", true)) foreach (var s in mapfile.GetSection("STRUCTURES", true))
{ {
//num=owner,type,health,location,facing,trigger,unknown,shouldRepair //num=owner,type,health,location,facing,trigger,unknown,shouldRepair
var parts = s.Value.ToLowerInvariant().Split(','); var parts = s.Value.Split(',');
var loc = int.Parse(parts[3]); var loc = int.Parse(parts[3]);
world.Add(new Actor(Rules.UnitInfo[parts[1]], new int2(loc % 128, loc / 128), players[0])); world.Add(new Actor(Rules.UnitInfo[parts[1].ToLowerInvariant()], new int2(loc % 128, loc / 128), players[0]));
} }
} }
@@ -117,9 +117,9 @@ namespace OpenRa.Game
foreach (var s in mapfile.GetSection("UNITS", true)) foreach (var s in mapfile.GetSection("UNITS", true))
{ {
//num=owner,type,health,location,facing,action,trigger //num=owner,type,health,location,facing,action,trigger
var parts = s.Value.ToLowerInvariant().Split( ',' ); var parts = s.Value.Split( ',' );
var loc = int.Parse(parts[3]); var loc = int.Parse(parts[3]);
world.Add(new Actor(Rules.UnitInfo[parts[1]], new int2(loc % 128, loc / 128), world.Add(new Actor(Rules.UnitInfo[parts[1].ToLowerInvariant()], new int2(loc % 128, loc / 128),
players.Values.FirstOrDefault(p => p.PlayerName == parts[0]) players.Values.FirstOrDefault(p => p.PlayerName == parts[0])
?? players[0])); ?? players[0]));
} }