This commit is contained in:
ineed bots
2023-11-27 17:56:02 -06:00
parent 31c94eac43
commit 3498bd096c
2 changed files with 385 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ connected()
self thread onSpawned();
self thread onDeath();
self thread onGiveLoadout();
self thread onKillcam();
@@ -1472,6 +1473,35 @@ 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.
*/