fix desync on win/lose
This commit is contained in:
@@ -60,9 +60,9 @@ namespace OpenRA.Mods.RA
|
|||||||
foreach (var a in self.World.Actors.Where(a => a.Owner == self.Owner))
|
foreach (var a in self.World.Actors.Where(a => a.Owner == self.Owner))
|
||||||
a.Kill(a);
|
a.Kill(a);
|
||||||
|
|
||||||
|
self.Owner.Shroud.Disabled = true;
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
if (self.Owner == self.World.LocalPlayer)
|
||||||
{
|
{
|
||||||
self.World.RenderedShroud.Disabled = true;
|
|
||||||
Game.RunAfterDelay(Info.NotificationDelay, () =>
|
Game.RunAfterDelay(Info.NotificationDelay, () =>
|
||||||
{
|
{
|
||||||
if (Game.IsCurrentWorld(self.World))
|
if (Game.IsCurrentWorld(self.World))
|
||||||
@@ -77,9 +77,9 @@ namespace OpenRA.Mods.RA
|
|||||||
self.Owner.WinState = WinState.Won;
|
self.Owner.WinState = WinState.Won;
|
||||||
|
|
||||||
Game.Debug("{0} is victorious.".F(self.Owner.PlayerName));
|
Game.Debug("{0} is victorious.".F(self.Owner.PlayerName));
|
||||||
|
self.Owner.Shroud.Disabled = true;
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
if (self.Owner == self.World.LocalPlayer)
|
||||||
{
|
{
|
||||||
self.World.RenderedShroud.Disabled = true;
|
|
||||||
Game.RunAfterDelay(Info.NotificationDelay, () => Sound.PlayNotification(self.Owner, "Speech", "Win", self.Owner.Country.Race));
|
Game.RunAfterDelay(Info.NotificationDelay, () => Sound.PlayNotification(self.Owner, "Speech", "Win", self.Owner.Country.Race));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user