Add map-player check to SurrenderOnDisconnect

This commit is contained in:
Paul Chote
2011-06-21 03:41:36 +12:00
parent 1cdfd44d43
commit 6feccab5db

View File

@@ -24,10 +24,8 @@ namespace OpenRA.Mods.RA
public void Tick(Actor self)
{
if (Disconnected) return;
var p = self.Owner;
if (Disconnected || !p.PlayerReference.Playable) return;
if (p.WinState == WinState.Lost || p.WinState == WinState.Won) return; /* already won or lost */
var client = p.World.LobbyInfo.ClientWithIndex(p.ClientIndex);