Make the Viewport code easier to follow
This commit is contained in:
@@ -421,11 +421,19 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
sovietWarFactory = actors["SovietWarFactory"];
|
sovietWarFactory = actors["SovietWarFactory"];
|
||||||
sovietRallyPoint = actors["SovietRallyPoint"];
|
sovietRallyPoint = actors["SovietRallyPoint"];
|
||||||
flamersEntryPoint = actors["FlamersEntryPoint"];
|
flamersEntryPoint = actors["FlamersEntryPoint"];
|
||||||
w.WorldActor.Trait<Shroud>().Explore(w, sam1.Location, 2);
|
var shroud = w.WorldActor.Trait<Shroud>();
|
||||||
w.WorldActor.Trait<Shroud>().Explore(w, sam2.Location, 2);
|
shroud.Explore(w, sam1.Location, 2);
|
||||||
w.WorldActor.Trait<Shroud>().Explore(w, sam3.Location, 2);
|
shroud.Explore(w, sam2.Location, 2);
|
||||||
w.WorldActor.Trait<Shroud>().Explore(w, sam4.Location, 2);
|
shroud.Explore(w, sam3.Location, 2);
|
||||||
Game.MoveViewport(((w.LocalPlayer ?? allies1) == allies1 ? chinookHusk.Location : allies2BasePoint.Location).ToFloat2());
|
shroud.Explore(w, sam4.Location, 2);
|
||||||
|
if (w.LocalPlayer == null || w.LocalPlayer == allies1)
|
||||||
|
{
|
||||||
|
Game.MoveViewport(chinookHusk.Location.ToFloat2());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Game.MoveViewport(allies2BasePoint.Location.ToFloat2());
|
||||||
|
}
|
||||||
Game.ConnectionStateChanged += StopMusic;
|
Game.ConnectionStateChanged += StopMusic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user