mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
add missed respawn_time delay by current implementation
This commit is contained in:
parent
8d9120c10b
commit
09c481fb8e
@ -1368,13 +1368,15 @@ void StartFrame( void )
|
||||
|
||||
// if there are currently less than the maximum number of "players"
|
||||
// then add another bot using the default skill level...
|
||||
if( count < max_bots )
|
||||
if( ( count < max_bots ) && ( gpGlobals->time >= respawn_time ) )
|
||||
{
|
||||
for( i = 0; i < 32; i++ )
|
||||
{
|
||||
if( !bot_respawn[i].is_used && bot_respawn[i].state == BOT_IDLE)
|
||||
{
|
||||
BotCreate( bot_respawn[i].skin, bot_respawn[i].name, bot_respawn[i].skill );
|
||||
|
||||
respawn_time = gpGlobals->time + 1.0; // set next respawn time
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user