make it work, but there's some issues
This commit is contained in:
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public void WorldLoaded(World w)
|
public void WorldLoaded(World w)
|
||||||
{
|
{
|
||||||
Map = w.Map;
|
Map = w.Map;
|
||||||
Players = w.WorldActor.Trait<CreateMapPlayers>().Players;
|
Players = w.players.Values.ToDictionary(p => p.InternalName);
|
||||||
Actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
Actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||||
Game.MoveViewport((.5f * (w.Map.TopLeft + w.Map.BottomRight).ToFloat2()).ToInt2());
|
Game.MoveViewport((.5f * (w.Map.TopLeft + w.Map.BottomRight).ToFloat2()).ToInt2());
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
foreach(var p in Players)
|
foreach(var p in Players)
|
||||||
{
|
{
|
||||||
foreach(var q in w.Map.Players[p.Key].Allies)
|
// foreach(var q in w.Map.Players[p.Key].Allies)
|
||||||
p.Value.Stances[Players[q]] = Stance.Ally;
|
// p.Value.Stances[Players[q]] = Stance.Ally;
|
||||||
|
|
||||||
foreach(var q in w.Map.Players[p.Key].Enemies)
|
// foreach(var q in w.Map.Players[p.Key].Enemies)
|
||||||
p.Value.Stances[Players[q]] = Stance.Enemy;
|
// p.Value.Stances[Players[q]] = Stance.Enemy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user