691,697 fixed
This commit is contained in:
@@ -74,19 +74,6 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
server.SyncLobbyInfo();
|
server.SyncLobbyInfo();
|
||||||
return true;
|
return true;
|
||||||
}},
|
}},
|
||||||
{ "spectator",
|
|
||||||
s =>
|
|
||||||
{
|
|
||||||
var slotData = server.lobbyInfo.Slots.Where(ax => ax.Spectator && !server.lobbyInfo.Clients.Any(l => l.Slot == ax.Index)).FirstOrDefault();
|
|
||||||
if (slotData == null)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
client.Slot = slotData.Index;
|
|
||||||
S.SyncClientToPlayerReference(client, slotData.MapPlayer != null ? server.Map.Players[slotData.MapPlayer] : null);
|
|
||||||
|
|
||||||
server.SyncLobbyInfo();
|
|
||||||
return true;
|
|
||||||
}},
|
|
||||||
{ "slot",
|
{ "slot",
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
@@ -101,6 +88,10 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
client.Slot = slot;
|
client.Slot = slot;
|
||||||
S.SyncClientToPlayerReference(client, slotData.MapPlayer != null ? server.Map.Players[slotData.MapPlayer] : null);
|
S.SyncClientToPlayerReference(client, slotData.MapPlayer != null ? server.Map.Players[slotData.MapPlayer] : null);
|
||||||
|
|
||||||
|
// if we're entering a spectator slot, relinquish our spawnpoint.
|
||||||
|
if (slotData.Spectator)
|
||||||
|
client.SpawnPoint = 0;
|
||||||
|
|
||||||
server.SyncLobbyInfo();
|
server.SyncLobbyInfo();
|
||||||
return true;
|
return true;
|
||||||
}},
|
}},
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server.lobbyInfo.Slots[client.Slot].Spectator)
|
||||||
|
{
|
||||||
|
server.SendChatTo( conn, "Can't select a spawnpoint as a spectator" );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (server.lobbyInfo.Clients.Where( c => c != client ).Any( c => (c.SpawnPoint == spawnPoint) && (c.SpawnPoint != 0) ))
|
if (server.lobbyInfo.Clients.Where( c => c != client ).Any( c => (c.SpawnPoint == spawnPoint) && (c.SpawnPoint != 0) ))
|
||||||
{
|
{
|
||||||
server.SendChatTo( conn, "You can't be at the same spawn point as another player" );
|
server.SendChatTo( conn, "You can't be at the same spawn point as another player" );
|
||||||
|
|||||||
Reference in New Issue
Block a user