diff options
author | aap <aap@papnet.eu> | 2020-10-28 10:33:46 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-10-28 10:33:46 +0100 |
commit | 81e462b6770f78eab1f8241b2b0df58b91f89008 (patch) | |
tree | 6c1080c484a88d31f0e81652669dc86789fc55ee /src | |
parent | fixed skin on player head (diff) | |
parent | fix FireShotgun missing normalise (diff) | |
download | re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar.gz re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar.bz2 re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar.lz re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar.xz re3-81e462b6770f78eab1f8241b2b0df58b91f89008.tar.zst re3-81e462b6770f78eab1f8241b2b0df58b91f89008.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/render/Weather.cpp | 2 | ||||
-rw-r--r-- | src/weapons/Weapon.cpp | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index 2c0b27d2..f16467b6 100644 --- a/src/render/Weather.cpp +++ b/src/render/Weather.cpp @@ -346,7 +346,7 @@ void CWeather::AddRain() pos.y = CGeneral::GetRandomNumberInRange(DROPLETS_TOP_OFFSET, screen_height - DROPLETS_TOP_OFFSET); pos.z = 0.0f; CParticle::AddParticle(PARTICLE_RAINDROP_2D, pos, CVector(0.0f, 0.0f, 0.0f), nil, CGeneral::GetRandomNumberInRange(0.5f, 0.9f), - colour, CGeneral::GetRandomNumberInRange(-10, 10), 360 - rain_angle + CGeneral::GetRandomNumberInRange(-30, 30), cur_frame, 0); + colour, CGeneral::GetRandomNumberInRange(-10, 10), 360 - rain_angle + CGeneral::GetRandomNumberInRange(-30, 30), cur_frame, 50); } int num_splash_attempts = (int)(3 * Rain) + 1; int num_splashes = (int)(3 * Rain) + 4; diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 85f0bc15..9494c745 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -108,10 +108,17 @@ CWeapon::Fire(CEntity *shooter, CVector *fireSource) CVector fireOffset(0.0f, 0.0f, 0.6f); CVector *source = fireSource; - if (!fireSource) { + if (!fireSource) + { + fireOffset = shooter->GetMatrix() * fireOffset; +#ifdef FIX_BUGS static CVector tmp; - tmp = shooter->GetMatrix() * fireOffset; + tmp = fireOffset; source = &tmp; +#else + source = &fireOffset; +#endif + } if ( m_bAddRotOffset ) { @@ -1166,6 +1173,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) { float shootAngle = DEGTORAD(7.5f*i + shooterAngle - 15.0f); CVector2D shootRot(-Sin(shootAngle), Cos(shootAngle)); + shootRot.Normalise(); CVector source, target; CColPoint point; |