Skip to content

Commit

Permalink
Fix Human Grunt checking enemy incorrectly in CheckMeleeAttack1
Browse files Browse the repository at this point in the history
Resolves ValveSoftware/halflife#3176

(cherry picked from commit 4dda07c)
  • Loading branch information
SamVanheer authored and LogicAndTrick committed Dec 26, 2021
1 parent 199dc69 commit 7e5f3f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dlls/hgrunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,16 @@ bool CHGrunt ::FCanCheckAttacks()
//=========================================================
bool CHGrunt ::CheckMeleeAttack1(float flDot, float flDist)
{
CBaseMonster* pEnemy;
CBaseMonster* pEnemy = nullptr;

if (m_hEnemy != NULL)
{
pEnemy = m_hEnemy->MyMonsterPointer();
}

if (!pEnemy)
{
return false;
}
if (!pEnemy)
{
return false;
}

if (flDist <= 64 && flDot >= 0.7 &&
Expand Down

0 comments on commit 7e5f3f4

Please sign in to comment.