Refactor per-player shrouds & fix shellmap shroud.

This commit is contained in:
Paul Chote
2013-04-10 00:35:39 +12:00
parent 66eff85aa4
commit c428cad70c
33 changed files with 146 additions and 120 deletions

View File

@@ -47,10 +47,11 @@ namespace OpenRA.Mods.RA
}
// Explore allied shroud
foreach (var p in Start)
if ((world.LocalPlayer != null ) &&(p.Key == world.LocalPlayer || p.Key.Stances[world.LocalPlayer] == Stance.Ally))
world.WorldActor.Trait<Shroud>().Explore(world, p.Value,
world.WorldActor.Info.Traits.Get<MPStartLocationsInfo>().InitialExploreRange);
var explore = world.WorldActor.Info.Traits.Get<MPStartLocationsInfo>().InitialExploreRange;
foreach (var p in Start.Keys)
foreach (var q in world.Players)
if (p.IsAlliedWith(q))
q.Shroud.Explore(world, Start[p], explore);
// Set viewport
if (world.LocalPlayer != null && Start.ContainsKey(world.LocalPlayer))