This commit is contained in:
ineed bots
2023-11-27 14:18:15 -06:00
parent af4d44c3a4
commit 13a6417a9d
5 changed files with 137 additions and 467 deletions

View File

@@ -52,7 +52,6 @@ connected()
self thread onSpawned();
self thread onDeath();
self thread onGiveLoadout();
self thread onKillcam();
@@ -1473,35 +1472,6 @@ onDeath()
}
}
/*
Watches when the bot is given a loadout
*/
onGiveLoadout_loop()
{
class = self.class;
if ( isDefined( self.bot_oma_class ) )
class = self.bot_oma_class;
self botGiveLoadout( self.team, class, !isDefined( self.bot_oma_class ) );
self.bot_oma_class = undefined;
}
/*
Watches when the bot is given a loadout
*/
onGiveLoadout()
{
self endon( "disconnect" );
for ( ;; )
{
self waittill( "giveLoadout" );
self onGiveLoadout_loop();
}
}
/*
When the bot spawns.
*/
@@ -1849,7 +1819,7 @@ changeToWeapon( weap )
if ( !self HasWeapon( weap ) )
return false;
self BotChangeToWeapon( weap );
self switchToWeapon( weap );
if ( self GetCurrentWeapon() == weap )
return true;