define active bot state, remove is_used status as wrong respawn_index

This commit is contained in:
ghost 2024-01-16 21:33:43 +02:00
parent ae8e5ab61f
commit c4556d215e

View File

@ -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)