File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ public class ServerBattle : Battle
2929 public const int MapVoteTime = 25 ;
3030 public const int NumberOfMapChoices = 4 ;
3131 public const int MinimumAutostartPlayers = 6 ;
32+ public const int MinimumGameSizeToPrioritiseNewPlayers = 13 ; // TODO: !commandable per host
3233 public const int PrevBattleQueueOffset = 100000 ;
3334 public static int BattleCounter ;
3435 public int QueueCounter = 0 ;
@@ -1143,7 +1144,14 @@ protected virtual async Task OnDedicatedExited(SpringBattleContext springBattleC
11431144 if ( ubs . QueueOrder > QueueCounter + PrevBattleQueueOffset / 2 ) ubs . QueueOrder -= PrevBattleQueueOffset ;
11441145 }
11451146 }
1146- previousGamePlayers = springBattleContext . ActualPlayers . Where ( x => ! x . IsSpectator ) . Select ( x => x . Name ) . ToList ( ) ;
1147+ var players = springBattleContext . ActualPlayers . Where ( x => ! x . IsSpectator ) . Select ( x => x . Name ) . ToList ( ) ;
1148+ if ( players . Count >= MinimumGameSizeToPrioritiseNewPlayers ) {
1149+ previousGamePlayers = players ;
1150+ }
1151+ else
1152+ {
1153+ previousGamePlayers = new List < string > ( ) ;
1154+ }
11471155 foreach ( var n in previousGamePlayers )
11481156 {
11491157 UserBattleStatus ubs ;
You can’t perform that action at this time.
0 commit comments