diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-19 20:33:17 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-19 20:33:17 +0100 |
commit | 0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3 (patch) | |
tree | 1661ba63db29b109ab9e759bc5b2d293eb0841de /src/weapons/Weapon.cpp | |
parent | scaling (diff) | |
parent | anim fixes (diff) | |
download | re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar.gz re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar.bz2 re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar.lz re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar.xz re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.tar.zst re3-0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3.zip |
Diffstat (limited to 'src/weapons/Weapon.cpp')
-rw-r--r-- | src/weapons/Weapon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index dc15485e..a987a4c7 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -385,7 +385,7 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) if ( victimPed->bUsesCollision || victimPed->Dead() || victimPed->Driving() ) { CVector victimPedPos = victimPed->GetPosition(); - if ( SQR(victimPedRadius) > (victimPedPos-(*fireSource)).MagnitudeSqr() ) + if ( SQR(victimPedRadius) > (victimPedPos-fireSource).MagnitudeSqr() ) { CVector collisionDist; @@ -393,7 +393,7 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) while ( s < victimPedCol->numSpheres ) { CColSphere *sphere = &victimPedCol->spheres[s]; - collisionDist = victimPedPos+sphere->center-(*fireSource); + collisionDist = victimPedPos+sphere->center-fireSource; if ( SQR(sphere->radius + info->m_fRadius) > collisionDist.MagnitudeSqr() ) { |