diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-09 04:34:04 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-09 04:34:04 +0100 |
commit | ba0c9e8b295cc988077df68a71573d3ebcff2b60 (patch) | |
tree | 0532f46e3335ca84ff32caa4884a145ba06e0e10 /src/weapons | |
parent | Frontend cleanup, .INI, CFO, scrollable pages (diff) | |
parent | Merge pull request #872 from withmorten/sized-enums-miami (diff) | |
download | re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar.gz re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar.bz2 re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar.lz re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar.xz re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.tar.zst re3-ba0c9e8b295cc988077df68a71573d3ebcff2b60.zip |
Diffstat (limited to '')
-rw-r--r-- | src/weapons/Weapon.cpp | 7 |
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 |