Only play movies in Allies 01 and Soviet 01 Classic if there's one client
This commit is contained in:
@@ -340,15 +340,25 @@ namespace OpenRA.Mods.RA.Missions
|
||||
alliesRes.TakeOre(alliesRes.Ore);
|
||||
|
||||
Game.MoveViewport(insertionLZ.Location.ToFloat2());
|
||||
Media.PlayFMVFullscreen(w, "ally1.vqa", () =>
|
||||
|
||||
if (MissionUtils.IsSingleClient(world))
|
||||
{
|
||||
Media.PlayFMVFullscreen(w, "landing.vqa", () =>
|
||||
Media.PlayFMVFullscreen(w, "ally1.vqa", () =>
|
||||
{
|
||||
InsertTanyaAtLZ();
|
||||
SendPatrol();
|
||||
MissionUtils.PlayMissionMusic();
|
||||
Media.PlayFMVFullscreen(w, "landing.vqa", () =>
|
||||
{
|
||||
InsertTanyaAtLZ();
|
||||
SendPatrol();
|
||||
MissionUtils.PlayMissionMusic();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
InsertTanyaAtLZ();
|
||||
SendPatrol();
|
||||
MissionUtils.PlayMissionMusic();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,6 +517,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
public void WorldLoaded(World w)
|
||||
{
|
||||
world = w;
|
||||
|
||||
allies1 = w.Players.Single(p => p.InternalName == "Allies1");
|
||||
allies2 = w.Players.SingleOrDefault(p => p.InternalName == "Allies2");
|
||||
if (allies2 == null)
|
||||
@@ -525,6 +526,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
}
|
||||
allies = w.Players.Single(p => p.InternalName == "Allies");
|
||||
soviets = w.Players.Single(p => p.InternalName == "Soviets");
|
||||
|
||||
var actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||
sam1 = actors["SAM1"];
|
||||
sam2 = actors["SAM2"];
|
||||
@@ -555,12 +557,15 @@ namespace OpenRA.Mods.RA.Missions
|
||||
sovietTownAttackPoint2 = actors["SovietTownAttackPoint2"];
|
||||
yakEntryPoint = actors["YakEntryPoint"];
|
||||
yakAttackPoint = actors["YakAttackPoint"];
|
||||
|
||||
SetupAlliedBase(actors);
|
||||
|
||||
var shroud = w.WorldActor.Trait<Shroud>();
|
||||
shroud.Explore(w, sam1.Location, 2);
|
||||
shroud.Explore(w, sam2.Location, 2);
|
||||
shroud.Explore(w, sam3.Location, 2);
|
||||
shroud.Explore(w, sam4.Location, 2);
|
||||
|
||||
if (w.LocalPlayer == null || w.LocalPlayer == allies1)
|
||||
{
|
||||
Game.MoveViewport(chinookHusk.Location.ToFloat2());
|
||||
@@ -569,6 +574,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
Game.MoveViewport(allies2BasePoint.Location.ToFloat2());
|
||||
}
|
||||
|
||||
MissionUtils.PlayMissionMusic();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Mods.RA.Air;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Mods.RA.Move;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
@@ -437,6 +436,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
|
||||
allies = w.Players.Single(p => p.InternalName == "Allies");
|
||||
soviets = w.Players.Single(p => p.InternalName == "Soviets");
|
||||
|
||||
var actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||
exit1TopLeft = actors["Exit1TopLeft"];
|
||||
exit1BottomRight = actors["Exit1BottomRight"];
|
||||
@@ -466,6 +466,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
var topLeft = actors["ParadropBoxTopLeft"];
|
||||
var bottomRight = actors["ParadropBoxBottomRight"];
|
||||
paradropBox = new Rectangle(topLeft.Location.X, topLeft.Location.Y, bottomRight.Location.X - topLeft.Location.X, bottomRight.Location.Y - topLeft.Location.Y);
|
||||
|
||||
if (w.LocalPlayer == null || w.LocalPlayer == allies1)
|
||||
{
|
||||
Game.MoveViewport(allies1EntryPoint.Location.ToFloat2());
|
||||
@@ -474,6 +475,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
Game.MoveViewport(allies2EntryPoint.Location.ToFloat2());
|
||||
}
|
||||
|
||||
OnObjectivesUpdated(false);
|
||||
MissionUtils.PlayMissionMusic();
|
||||
}
|
||||
|
||||
@@ -143,6 +143,11 @@ namespace OpenRA.Mods.RA.Missions
|
||||
return world.Actors.FirstOrDefault(a => a.HasTrait<Cargo>() && a.Trait<Cargo>().Passengers.Contains(actor));
|
||||
}
|
||||
|
||||
public static bool IsSingleClient(World world)
|
||||
{
|
||||
return world.LobbyInfo.Clients.Count() == 1;
|
||||
}
|
||||
|
||||
public static void PlayMissionMusic()
|
||||
{
|
||||
if (!Rules.InstalledMusic.Any()) return;
|
||||
|
||||
@@ -150,8 +150,10 @@ namespace OpenRA.Mods.RA.Missions
|
||||
public void WorldLoaded(World w)
|
||||
{
|
||||
world = w;
|
||||
|
||||
ussr = w.Players.Single(p => p.InternalName == "USSR");
|
||||
france = w.Players.Single(p => p.InternalName == "France");
|
||||
|
||||
var actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||
startJeep = actors["StartJeep"];
|
||||
startJeepMovePoint = actors["StartJeepMovePoint"];
|
||||
@@ -164,13 +166,24 @@ namespace OpenRA.Mods.RA.Missions
|
||||
airfield2 = actors["Airfield2"];
|
||||
airfield3 = actors["Airfield3"];
|
||||
airfields = new[] { airfield1, airfield2, airfield3 };
|
||||
|
||||
Game.MoveViewport(startJeep.Location.ToFloat2());
|
||||
Media.PlayFMVFullscreen(w, "soviet1.vqa", () =>
|
||||
|
||||
if (MissionUtils.IsSingleClient(world))
|
||||
{
|
||||
Media.PlayFMVFullscreen(w, "soviet1.vqa", () =>
|
||||
{
|
||||
LandYaks();
|
||||
MoveJeep();
|
||||
MissionUtils.PlayMissionMusic();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
MissionUtils.PlayMissionMusic();
|
||||
LandYaks();
|
||||
MoveJeep();
|
||||
});
|
||||
MissionUtils.PlayMissionMusic();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user