mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-20 00:24:49 +00:00
Update Autobalance.cs
Flag Carrier detection
This commit is contained in:
parent
5dfa92a067
commit
b550f7d351
|
|
@ -78,8 +78,14 @@ function Autobalance( %game, %AutobalanceSafetynetTrys )
|
|||
if(%UseAllMode)
|
||||
{
|
||||
//Try to pick any player
|
||||
if(%autobalanceRandom == %autobalanceLoop || %lastclient[%team] $= "")
|
||||
%teamcanidate[%team] = %client;
|
||||
if(%autobalanceRandom == %autobalanceLoop || %lastclient[%team] $= "")
|
||||
{
|
||||
//If random player has the flag pick the next person
|
||||
if(!%client.player.holdingFlag)
|
||||
%teamcanidate[%team] = %client;
|
||||
else
|
||||
%autobalanceRandom = %autobalanceRandom + 1;
|
||||
}
|
||||
|
||||
%autobalanceLoop++;
|
||||
}
|
||||
|
|
@ -87,8 +93,11 @@ function Autobalance( %game, %AutobalanceSafetynetTrys )
|
|||
{
|
||||
//Normal circumstances
|
||||
//Try to pick a low scoring player
|
||||
if(%client.score < %lastclient[%team].score || %lastclient[%team] $= "")
|
||||
%teamcanidate[%team] = %client;
|
||||
if(%client.score < %lastclient[%team].score || %lastclient[%team] $= "")
|
||||
{
|
||||
if(!%client.player.holdingFlag)
|
||||
%teamcanidate[%team] = %client;
|
||||
}
|
||||
}
|
||||
|
||||
%lastclient[%team] = %client;
|
||||
|
|
|
|||
Loading…
Reference in a new issue