Don't propagate locked spawns when changing slots.

This commit is contained in:
Paul Chote
2016-03-06 11:24:24 +00:00
parent f23df1170b
commit 8b9bdadf53

View File

@@ -146,6 +146,11 @@ namespace OpenRA.Mods.Common.Server
if (slot.Closed || server.LobbyInfo.ClientInSlot(s) != null) if (slot.Closed || server.LobbyInfo.ClientInSlot(s) != null)
return false; return false;
// If the previous slot had a locked spawn then we must not carry that to the new slot
var oldSlot = client.Slot != null ? server.LobbyInfo.Slots[client.Slot] : null;
if (oldSlot != null && oldSlot.LockSpawn)
client.SpawnPoint = 0;
client.Slot = s; client.Slot = s;
S.SyncClientToPlayerReference(client, server.MapPlayers.Players[s]); S.SyncClientToPlayerReference(client, server.MapPlayers.Players[s]);