mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-20 05:15:42 +00:00
Small opti
This commit is contained in:
parent
f3b58c5966
commit
f64ba9cccf
@ -655,6 +655,8 @@ diffBots_loop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
min_diff = GetDvarInt( "bots_skill_min" );
|
||||||
|
max_diff = GetDvarInt( "bots_skill_max" );
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
@ -663,7 +665,7 @@ diffBots_loop()
|
|||||||
if ( !player is_bot() )
|
if ( !player is_bot() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
player.pers["bots"]["skill"]["base"] = int( clamp( player.pers["bots"]["skill"]["base"], GetDvarInt( "bots_skill_min" ), GetDvarInt( "bots_skill_max" ) ) );
|
player.pers["bots"]["skill"]["base"] = int( clamp( player.pers["bots"]["skill"]["base"], min_diff, max_diff ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user