Merge pull request #42 from Boxhead78/master

Improve bot camping
This commit is contained in:
INeedGames 2022-04-06 15:05:15 -06:00 committed by GitHub
commit ebfba23513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2099,7 +2099,7 @@ bot_think_camp_loop()
if ( ret != "goal" )
return;
self thread killCampAfterTime( randomIntRange( 10, 20 ) );
self thread killCampAfterTime( randomIntRange( 30, 90 ) );
self CampAtSpot( campSpot.origin, campSpot.origin + AnglesToForward( campSpot.angles ) * 2048 );
}
@ -2134,7 +2134,16 @@ killCampAfterTime( time )
self endon( "disconnect" );
self endon( "kill_camp_bot" );
wait time + 0.05;
timeleft = maps\mp\gametypes\_gamelogic::getTimeRemaining() / 1000;
while ( time > 0 && timeleft >= 60 )
{
wait 1;
timeleft = maps\mp\gametypes\_gamelogic::getTimeRemaining() / 1000;
time--;
}
wait 0.05;
self ClearScriptGoal();
self ClearScriptAimPos();