Fix crouch projectile origin issue

Fixes issue where bullets originate from incorrect location when crouched
This commit is contained in:
Simon 2020-08-22 12:09:12 +01:00
parent 329eed0813
commit f6a70f1430
3 changed files with 5 additions and 5 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.rtcwquest" package="com.drbeef.rtcwquest"
android:versionCode="36" android:versionCode="37"
android:versionName="1.0.0" android:installLocation="auto" > android:versionName="1.0.1" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. --> <!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/> <uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -1745,7 +1745,7 @@ void CalcMuzzlePoint( gentity_t *ent, int weapon, vec3_t forward, vec3_t right,
float heightAdjust = 0; float heightAdjust = 0;
trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust); trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust);
convertFromVR(worldscale, ent, gVR->weaponoffset, ent->r.currentOrigin, muzzlePoint); 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; muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale;
return; return;
} }
@ -1806,7 +1806,7 @@ void CalcMuzzlePointForActivate( gentity_t *ent, vec3_t forward, vec3_t right, v
float heightAdjust = 0; float heightAdjust = 0;
trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust); trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust);
convertFromVR(worldscale, ent, gVR->weaponoffset, ent->r.currentOrigin, muzzlePoint); 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; muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale;
return; return;
} }

View file

@ -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. // q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file // 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.0 - release
// ver 1.0.1 - post-release work // ver 1.0.1 - post-release work
// ver 1.1.0 - patch 1 (12/12/01) // ver 1.1.0 - patch 1 (12/12/01)