Skip to content

Commit

Permalink
don't make aim horizontal if there's a target
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Aug 23, 2024
1 parent acf2c02 commit 1b2eb91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/shared/swarm/asw_weapon_plasma_thrower_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ void CASW_Weapon_Plasma_Thrower::PrimaryAttack()
UTIL_TraceLine( vecCamera, vecTraceEnd, MASK_SOLID | CONTENTS_IGNORE_NODRAW_OPAQUE, &filter, &tr );

info.m_vecDirShooting = tr.endpos - info.m_vecSrc;
info.m_vecDirShooting.z = 0;
if ( !tr.m_pEnt || !( tr.m_pEnt->GetFlags() & FL_AIMTARGET ) )
info.m_vecDirShooting.z = 0;
info.m_vecDirShooting.NormalizeInPlace();

info.m_flDistance = asw_weapon_max_shooting_distance.GetFloat();
Expand Down

0 comments on commit 1b2eb91

Please sign in to comment.