summaryrefslogtreecommitdiffstats
path: root/src/weapons/Weapon.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-08 02:29:08 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-08 02:29:08 +0100
commitaae4f3319f4dcc4b3338116572bcb3f6d0f05b7e (patch)
tree7bfa5dede4a4b1b54be7c7ede73926272d4d0ee9 /src/weapons/Weapon.cpp
parentFix vanilla font bug (diff)
downloadre3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar.gz
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar.bz2
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar.lz
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar.xz
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.tar.zst
re3-aae4f3319f4dcc4b3338116572bcb3f6d0f05b7e.zip
Diffstat (limited to '')
-rw-r--r--src/weapons/Weapon.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index d1f9490d..26ed2037 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.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
@@ -1486,9 +1487,9 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
CParticle::AddParticle(PARTICLE_SPARK, point->point, point->normal * 0.05f);
#ifndef FIX_BUGS
- CVector dist = point.point - (*fireSource);
+ CVector dist = point->point - (*source);
CVector offset = dist - Max(0.2f * dist.Magnitude(), 0.5f) * CVector(ahead.x, ahead.y, 0.0f);
- CVector smokePos = *fireSource + offset;
+ CVector smokePos = *source + offset;
#else
CVector smokePos = point->point;
#endif