fix race issue with selecting new leader

This commit is contained in:
Lorenc Pekaj 2018-11-13 16:06:14 +11:00
parent 81f3e5a768
commit fd8d9655db

View File

@ -844,7 +844,7 @@ stock GetClosestRacer( playerid, raceid, exceptid = INVALID_PLAYER_ID, &Float: d
if ( GetPlayerPos( playerid, fX, fY, fZ ) )
{
foreach (new i : Player) if ( p_raceLobbyId[ i ] == raceid && exceptid != i && GetPlayerVehicleSeat( playerid ) == 0 )
foreach ( new i : Player ) if ( p_raceLobbyId[ i ] == raceid && exceptid != i && GetPlayerVehicleSeat( i ) == 0 )
{
if ( 0.0 < ( fTmp = GetPlayerDistanceFromPoint( i, fX, fY, fZ ) ) < distance )
{