summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-10-28 01:10:53 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2020-10-28 01:10:53 +0100
commitf7b1ba4049006fa772d9e16db96ce326dbde4aa8 (patch)
tree9f7686eff2a804cf9925b44e9a2875c5eb99b68d /src
parentfix rainraindrop (diff)
downloadre3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar.gz
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar.bz2
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar.lz
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar.xz
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.tar.zst
re3-f7b1ba4049006fa772d9e16db96ce326dbde4aa8.zip
Diffstat (limited to 'src')
-rw-r--r--src/weapons/Weapon.cpp12
1 files changed, 10 insertions, 2 deletions
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;