fix desync on win/lose

This commit is contained in:
Chris Forbes
2013-03-12 10:15:04 +13:00
parent 623fce3cdf
commit 67ca37326e

View File

@@ -60,9 +60,9 @@ namespace OpenRA.Mods.RA
foreach (var a in self.World.Actors.Where(a => a.Owner == self.Owner))
a.Kill(a);
self.Owner.Shroud.Disabled = true;
if (self.Owner == self.World.LocalPlayer)
{
self.World.RenderedShroud.Disabled = true;
Game.RunAfterDelay(Info.NotificationDelay, () =>
{
if (Game.IsCurrentWorld(self.World))
@@ -77,9 +77,9 @@ namespace OpenRA.Mods.RA
self.Owner.WinState = WinState.Won;
Game.Debug("{0} is victorious.".F(self.Owner.PlayerName));
self.Owner.Shroud.Disabled = true;
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));
}
}