From f64ba9cccfd7bb29b761131acad94037965b4389 Mon Sep 17 00:00:00 2001 From: ineed bots Date: Wed, 20 Apr 2022 12:58:45 -0600 Subject: [PATCH] Small opti --- userraw/maps/mp/bots/_bot.gsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/userraw/maps/mp/bots/_bot.gsc b/userraw/maps/mp/bots/_bot.gsc index 2a95a49..347b212 100644 --- a/userraw/maps/mp/bots/_bot.gsc +++ b/userraw/maps/mp/bots/_bot.gsc @@ -655,6 +655,8 @@ diffBots_loop() } playercount = level.players.size; + min_diff = GetDvarInt( "bots_skill_min" ); + max_diff = GetDvarInt( "bots_skill_max" ); for ( i = 0; i < playercount; i++ ) { @@ -663,7 +665,7 @@ diffBots_loop() if ( !player is_bot() ) 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 ) ); } }