mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
improve box
This commit is contained in:
parent
60092ee40d
commit
99762d6136
@ -3682,8 +3682,38 @@ bot_turret_think()
|
||||
/*
|
||||
Loops
|
||||
*/
|
||||
bot_box_think_loop()
|
||||
bot_box_think_loop(data)
|
||||
{
|
||||
ret = "bot_check_box_think";
|
||||
if(data.first)
|
||||
data.first = false;
|
||||
else
|
||||
ret = self waittill_any_timeout( randomintrange( 3, 5 ), "bot_check_box_think" );
|
||||
|
||||
if ( RandomInt( 100 ) < 20 && ret != "bot_check_box_think" )
|
||||
return;
|
||||
|
||||
if ( self HasScriptGoal() || self.bot_lock_goal )
|
||||
return;
|
||||
|
||||
if (self HasThreat())
|
||||
return;
|
||||
|
||||
if(self isDefusing() || self isPlanting())
|
||||
return;
|
||||
|
||||
if(self IsUsingRemote() || self BotIsFrozen())
|
||||
return;
|
||||
|
||||
if (self inLastStand())
|
||||
return;
|
||||
|
||||
if (isDefined(self.hasLightArmor) && self.hasLightArmor)
|
||||
return;
|
||||
|
||||
if (self isJuggernaut())
|
||||
return;
|
||||
|
||||
box = undefined;
|
||||
myteam = self.pers[ "team" ];
|
||||
|
||||
@ -3751,26 +3781,12 @@ bot_box_think()
|
||||
self endon( "disconnect" );
|
||||
level endon("game_ended");
|
||||
|
||||
data = spawnStruct();
|
||||
data.first = true;
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
wait( randomintrange( 3, 5 ) );
|
||||
|
||||
if ( RandomInt( 100 ) < 20 )
|
||||
continue;
|
||||
|
||||
if ( self HasScriptGoal() || self.bot_lock_goal )
|
||||
continue;
|
||||
|
||||
if(self isDefusing() || self isPlanting())
|
||||
continue;
|
||||
|
||||
if(self IsUsingRemote() || self BotIsFrozen())
|
||||
continue;
|
||||
|
||||
if (self inLastStand())
|
||||
continue;
|
||||
|
||||
self bot_box_think_loop();
|
||||
self bot_box_think_loop(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user