Force T bot to plant the bomb if inside bomb-plant area and has C4.
Minor refactoring.
This commit is contained in:
parent
60556a0e4c
commit
e15b6219ec
4 changed files with 56 additions and 25 deletions
|
|
@ -1119,20 +1119,17 @@ void ClientDisconnect (edict_t *ent)
|
|||
// to reset his entity pointer for safety. There are still a few server frames to go once a
|
||||
// listen server client disconnects, and we don't want to send him any sort of message then.
|
||||
|
||||
bots.AdjustQuota (false, ent);
|
||||
int index = engine.IndexOfEntity (ent) - 1;
|
||||
|
||||
int i = engine.IndexOfEntity (ent) - 1;
|
||||
InternalAssert (index >= 0 && index < MAX_ENGINE_PLAYERS);
|
||||
|
||||
InternalAssert (i >= 0 && i < MAX_ENGINE_PLAYERS);
|
||||
|
||||
Bot *bot = bots.GetBot (i);
|
||||
Bot *bot = bots.GetBot (index);
|
||||
|
||||
// check if its a bot
|
||||
if (bot != nullptr)
|
||||
{
|
||||
if (bot->pev == &ent->v)
|
||||
bots.Free (i);
|
||||
}
|
||||
if (bot != nullptr && bot->pev == &ent->v)
|
||||
bots.Free (index);
|
||||
|
||||
bots.AdjustQuota (false, ent);
|
||||
|
||||
if (g_gameFlags & GAME_METAMOD)
|
||||
RETURN_META (MRES_IGNORED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue