Added another requirement for Lobbies in ServerMonitor 1500 available slots
This commit is contained in:
parent
e6818c4c46
commit
de5c0a77ef
@ -44,7 +44,7 @@ public class GroupStatusData
|
|||||||
// Lobby joinable checking
|
// Lobby joinable checking
|
||||||
if (existingServer.Motd.isEmpty() || existingServer.Motd.equals(""))
|
if (existingServer.Motd.isEmpty() || existingServer.Motd.equals(""))
|
||||||
{
|
{
|
||||||
if (serverStatusData.MaxPlayers - serverStatusData.Players > 15)
|
if (serverStatusData.MaxPlayers - serverStatusData.Players > 20)
|
||||||
_joinableCount--;
|
_joinableCount--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -66,7 +66,7 @@ public class GroupStatusData
|
|||||||
// Lobby joinable checking
|
// Lobby joinable checking
|
||||||
if (serverStatusData.Motd.isEmpty() || serverStatusData.Motd.equals(""))
|
if (serverStatusData.Motd.isEmpty() || serverStatusData.Motd.equals(""))
|
||||||
{
|
{
|
||||||
if (serverStatusData.MaxPlayers - serverStatusData.Players > 15)
|
if (serverStatusData.MaxPlayers - serverStatusData.Players > 20)
|
||||||
{
|
{
|
||||||
_joinableCount++;
|
_joinableCount++;
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,13 @@ public class ServerMonitor
|
|||||||
int serversToAdd = Math.max(serverGroup.RequiredTotalServers - groupStatus.getTotalServers(), serverGroup.RequiredJoinableServers - groupStatus.getJoinableCount());
|
int serversToAdd = Math.max(serverGroup.RequiredTotalServers - groupStatus.getTotalServers(), serverGroup.RequiredJoinableServers - groupStatus.getJoinableCount());
|
||||||
int serversToKill = (groupStatus.getTotalServers() > serverGroup.RequiredTotalServers && groupStatus.getJoinableCount() > serverGroup.RequiredJoinableServers) ? Math.min(groupStatus.getJoinableCount() - serverGroup.RequiredJoinableServers, groupStatus.EmptyServers.size()) : 0;
|
int serversToKill = (groupStatus.getTotalServers() > serverGroup.RequiredTotalServers && groupStatus.getJoinableCount() > serverGroup.RequiredJoinableServers) ? Math.min(groupStatus.getJoinableCount() - serverGroup.RequiredJoinableServers, groupStatus.EmptyServers.size()) : 0;
|
||||||
|
|
||||||
|
// Minimum 1500 slot bufferzone
|
||||||
|
if (serverGroup.Name.equalsIgnoreCase("Lobby"))
|
||||||
|
{
|
||||||
|
if (groupStatus.MaxPlayers - groupStatus.Players < 1500)
|
||||||
|
serversToAdd = serverGroup.RequiredJoinableServers;
|
||||||
|
}
|
||||||
|
|
||||||
while (serversToAdd > 0)
|
while (serversToAdd > 0)
|
||||||
{
|
{
|
||||||
int serverNum = groupStatus.getNextServerNumber();
|
int serverNum = groupStatus.getNextServerNumber();
|
||||||
|
Loading…
Reference in New Issue
Block a user