More shroud refactoring.
This introduces a hash on Shroud which ShroudRenderer can observe, removing the need to explicitly twiddle a dirty flag between objects. Shroud disabling is now done via RenderPlayer, so enabling the cheat or winning/losing will now give vis equivalent to an observer.
This commit is contained in:
@@ -62,9 +62,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.RenderPlayer = null;
|
||||
Game.RunAfterDelay(Info.NotificationDelay, () =>
|
||||
{
|
||||
if (Game.IsCurrentWorld(self.World))
|
||||
@@ -79,9 +79,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.RenderPlayer = null;
|
||||
Game.RunAfterDelay(Info.NotificationDelay, () => Sound.PlayNotification(self.Owner, "Speech", "Win", self.Owner.Country.Race));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user