mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 08:04:39 +00:00
Update Autobalance.cs
Flag Carrier detection
This commit is contained in:
parent
5dfa92a067
commit
b550f7d351
1 changed files with 13 additions and 4 deletions
|
|
@ -79,7 +79,13 @@ function Autobalance( %game, %AutobalanceSafetynetTrys )
|
||||||
{
|
{
|
||||||
//Try to pick any player
|
//Try to pick any player
|
||||||
if(%autobalanceRandom == %autobalanceLoop || %lastclient[%team] $= "")
|
if(%autobalanceRandom == %autobalanceLoop || %lastclient[%team] $= "")
|
||||||
%teamcanidate[%team] = %client;
|
{
|
||||||
|
//If random player has the flag pick the next person
|
||||||
|
if(!%client.player.holdingFlag)
|
||||||
|
%teamcanidate[%team] = %client;
|
||||||
|
else
|
||||||
|
%autobalanceRandom = %autobalanceRandom + 1;
|
||||||
|
}
|
||||||
|
|
||||||
%autobalanceLoop++;
|
%autobalanceLoop++;
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +94,10 @@ function Autobalance( %game, %AutobalanceSafetynetTrys )
|
||||||
//Normal circumstances
|
//Normal circumstances
|
||||||
//Try to pick a low scoring player
|
//Try to pick a low scoring player
|
||||||
if(%client.score < %lastclient[%team].score || %lastclient[%team] $= "")
|
if(%client.score < %lastclient[%team].score || %lastclient[%team] $= "")
|
||||||
%teamcanidate[%team] = %client;
|
{
|
||||||
|
if(!%client.player.holdingFlag)
|
||||||
|
%teamcanidate[%team] = %client;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%lastclient[%team] = %client;
|
%lastclient[%team] = %client;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue