summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-08 10:00:24 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-08 10:00:24 +0100
commit016ff5b4aa98ed24938284bfbf6db9373981a5de (patch)
tree8ea809158b4ade6e2d6ecd70453e6a9766b25cd0 /src/weapons
parentpool stuff fix (diff)
parentPool fixes from master (diff)
downloadre3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar.gz
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar.bz2
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar.lz
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar.xz
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.tar.zst
re3-016ff5b4aa98ed24938284bfbf6db9373981a5de.zip
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/Weapon.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index efaa43e4..52d95abb 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -1457,7 +1457,8 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
#ifndef FIX_BUGS
CVector dist = point->point - (*source);
- CVector smokePos = point->point - Max(0.1f * dist.Magnitude(), 0.2f) * dist / dist.Magnitude();
+ float distMagnitude = dist.Magnitude();
+ CVector smokePos = point->point - Max(distMagnitude / 10.0f, 0.2f) * dist / distMagnitude;
#else
CVector smokePos = point->point;
#endif // !FIX_BUGS