bot internal has everything now

This commit is contained in:
ineed bots
2023-04-30 12:58:36 -06:00
parent 52ebe9961f
commit caa27fcfc2
3 changed files with 355 additions and 4 deletions

View File

@@ -184,6 +184,21 @@ onDisconnectAll()
level.players = array_remove( level.players, self );
}
/*
When any client spawns
*/
onSpawnedAll()
{
self endon( "disconnect" );
for ( ;; )
{
self waittill( "spawned_player" );
self.lastSpawnTime = getTime();
}
}
/*
When a bot disconnects.
*/
@@ -207,6 +222,8 @@ connected()
level.players[level.players.size] = self;
self thread onDisconnectAll();
self thread onSpawnedAll();
if ( !self is_bot() )
return;