From f6a70f14303b062539834a26bd18084e6dc03274 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 22 Aug 2020 12:09:12 +0100 Subject: [PATCH] Fix crouch projectile origin issue Fixes issue where bullets originate from incorrect location when crouched --- Projects/Android/AndroidManifest.xml | 4 ++-- Projects/Android/jni/rtcw/src/game/g_weapon.c | 4 ++-- Projects/Android/jni/rtcw/src/game/q_shared.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/Android/AndroidManifest.xml b/Projects/Android/AndroidManifest.xml index e9fcfce..f2e83a1 100644 --- a/Projects/Android/AndroidManifest.xml +++ b/Projects/Android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="37" + android:versionName="1.0.1" android:installLocation="auto" > diff --git a/Projects/Android/jni/rtcw/src/game/g_weapon.c b/Projects/Android/jni/rtcw/src/game/g_weapon.c index b70a47c..58a6283 100644 --- a/Projects/Android/jni/rtcw/src/game/g_weapon.c +++ b/Projects/Android/jni/rtcw/src/game/g_weapon.c @@ -1745,7 +1745,7 @@ void CalcMuzzlePoint( gentity_t *ent, int weapon, vec3_t forward, vec3_t right, float heightAdjust = 0; trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust); convertFromVR(worldscale, ent, gVR->weaponoffset, ent->r.currentOrigin, muzzlePoint); - muzzlePoint[2] -= 24; // mmmmmmm magic number ( + muzzlePoint[2] += (ent->client->ps.viewheight - 64); muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale; return; } @@ -1806,7 +1806,7 @@ void CalcMuzzlePointForActivate( gentity_t *ent, vec3_t forward, vec3_t right, v float heightAdjust = 0; trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust); convertFromVR(worldscale, ent, gVR->weaponoffset, ent->r.currentOrigin, muzzlePoint); - muzzlePoint[2] -= 24; // mmmmmmm magic number + muzzlePoint[2] += (ent->client->ps.viewheight - 64); muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale; return; } diff --git a/Projects/Android/jni/rtcw/src/game/q_shared.h b/Projects/Android/jni/rtcw/src/game/q_shared.h index 1166cc0..30e875e 100644 --- a/Projects/Android/jni/rtcw/src/game/q_shared.h +++ b/Projects/Android/jni/rtcw/src/game/q_shared.h @@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#define Q3_VERSION "RTCWQuest 1.0.0 (Wolf 1.41)" +#define Q3_VERSION "RTCWQuest 1.0.1 (Wolf 1.41)" // ver 1.0.0 - release // ver 1.0.1 - post-release work // ver 1.1.0 - patch 1 (12/12/01)