Skip to content

Commit

Permalink
Fix for issue #4 (Assertion fails when botdontshoot is enabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkivilin authored Jan 19, 2019
1 parent 35b599e commit dfa0943
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot_combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,10 @@ void BotRemoveEnemy( bot_t &pBot, qboolean b_keep_tracking )
{
edict_t *pEdict = pBot.pEdict;

JKASSERT(pBot.pBotEnemy == NULL);
//JKASSERT(pBot.pBotEnemy == NULL);

// track enemy?
if(b_keep_tracking)
if(pBot.pBotEnemy != NULL && b_keep_tracking)
{
float track_time = RANDOM_FLOAT2(skill_settings[pBot.bot_skill].track_sound_time_min, skill_settings[pBot.bot_skill].track_sound_time_max);

Expand Down

0 comments on commit dfa0943

Please sign in to comment.