mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 05:04:17 +00:00
define active bot state, remove is_used status as wrong respawn_index
This commit is contained in:
parent
ae8e5ab61f
commit
c4556d215e
@ -296,7 +296,8 @@ void BotCreate(const char *skin, const char *name, const char *skill)
|
||||
|
||||
sprintf(c_index, "%d", index);
|
||||
|
||||
bot_respawn[index].is_used = TRUE; // this slot is used
|
||||
bot_respawn[index].is_used = TRUE;
|
||||
bot_respawn[index].state = BOT_IS_RESPAWNING;
|
||||
|
||||
// don't store the name here, it might change if same as another
|
||||
strcpy(bot_respawn[index].skin, c_skin);
|
||||
@ -1771,8 +1772,6 @@ void CBot::BotThink( void )
|
||||
pev->health = 0;
|
||||
pev->deadflag = DEAD_DEAD; // make the kicked bot be dead
|
||||
|
||||
bot_respawn[respawn_index].is_used = FALSE; // this slot is now free
|
||||
|
||||
respawn_index = -1; // indicate no slot used
|
||||
|
||||
// fall through to next if statement (respawn_index will be -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user