several fixes

- make weapon alignment code with for right handed properly
- made silenced luger far more accurate
- extended bem length in weapon align
- included latest weapons from baggyg
This commit is contained in:
Simon 2020-08-03 10:34:56 +01:00
parent 04801b7d19
commit d6ba7e70d8
7 changed files with 30 additions and 15 deletions

View file

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

View file

@ -29,9 +29,20 @@ void HandleInput_WeaponAlign( ovrInputStateTrackedRemote *pDominantTrackedRemote
{
//always right handed for this
vr.right_handed = true;
static qboolean dominantGripPushed = false;
static float dominantGripPushTime = 0.0f;
/*
char cvar_name[64];
Com_sprintf(cvar_name, sizeof(cvar_name), "vr_weapon_adjustment_%i", vr.weaponid);
char weapon_adjustment[256];
Cvar_VariableStringBuffer(cvar_name, weapon_adjustment, 256);
sscanf(weapon_adjustment, "%f,%f,%f,%f,%f,%f,%f", &vr.test_scale,
&(vr.test_offset[0]), &(vr.test_offset[1]), &(vr.test_offset[2]),
&(vr.test_angles[PITCH]), &(vr.test_angles[YAW]), &(vr.test_angles[ROLL]));
VectorScale(vr.test_offset, vr.test_scale, vr.test_offset);
*/
//Need this for the touch screen
{
@ -105,6 +116,8 @@ void HandleInput_WeaponAlign( ovrInputStateTrackedRemote *pDominantTrackedRemote
positional_movementSideways,
positional_movementForward);
dominantGripPushed = (pDominantTrackedRemoteNew->Buttons &
ovrButton_GripTrigger) != 0;
//We need to record if we have started firing primary so that releasing trigger will stop firing, if user has pushed grip
//in meantime, then it wouldn't stop the gun firing and it would get stuck

View file

@ -2227,6 +2227,7 @@ static void CG_FlamethrowerFlame( centity_t *cent, vec3_t origin ) {
CG_FireFlameChunks(cent, origin, angles, 1.0, qtrue, 1);
trap_Vibrate(-1, cgVR->right_handed ? 1 : 0, 0.6);
trap_Vibrate(-1, cgVR->right_handed ? 1 : 0, 0.6);
if (cgVR->weapon_stabilised)
{
@ -3559,15 +3560,15 @@ void CG_AddViewWeapon( playerState_t *ps ) {
vec3_t forward, right, up;
AngleVectors(angles, forward, right, up);
VectorMA(origin, 24, forward, endForward);
VectorMA(origin, 40, forward, endForward);
VectorSet(ci.color, 1, 0, 0); // Forward is red
CG_RailTrail2(&ci, origin, endForward);
VectorMA(origin, 24, right, endRight);
VectorMA(origin, 20, right, endRight);
VectorSet(ci.color, 0, 1, 0); // right is green
CG_RailTrail2(&ci, origin, endRight);
VectorMA(origin, 24, up, endUp);
VectorMA(origin, 20, up, endUp);
VectorSet(ci.color, 0, 0, 1); // up is blue
CG_RailTrail2(&ci, origin, endUp);
}
@ -5217,7 +5218,7 @@ void CG_WeaponFireRecoil( int weapon ) {
break;
case WP_SNIPERRIFLE:
case WP_SNOOPERSCOPE:
pitchAdd = 0.6;
pitchAdd = 2.0;
break;
case WP_FG42SCOPE:
case WP_FG42:

View file

@ -914,16 +914,17 @@ void ClientThink_real( gentity_t *ent ) {
}
// NOTE: -------------- SP uses now too
// JPW NERVE do some time-based muzzle flip -- this never gets touched in single player (see g_weapon.c)
// #define RIFLE_SHAKE_TIME 150 // JPW NERVE this one goes with the commented out old damped "realistic" behavior below
#define RIFLE_SHAKE_TIME 300 // per Id request, longer recoil time
// JPW NERVE do some time-based muzzle flip -- this never gets touched in single player (see g_weapon.c)
// #define RIFLE_SHAKE_TIME 150 // JPW NERVE this one goes with the commented out old damped "realistic" behavior below
#define RIFLE_SHAKE_TIME 300 // per Id request, longer recoil time
if ( client->sniperRifleFiredTime ) {
if ( level.time - client->sniperRifleFiredTime > RIFLE_SHAKE_TIME ) {
client->sniperRifleFiredTime = 0;
} else {
VectorCopy( client->ps.viewangles,muzzlebounce );
// JPW old damped behavior -- feels more like a real rifle (modeled on Remington 700 7.62x51mm w/ 14x scope)
// JPW old damped behavior -- feels more like a real rifle (modeled on Remington 700 7.62x51mm w/ 14x scope)
/*
muzzlebounce[PITCH] -= 2*cos(1.0-(level.time - client->sniperRifleFiredTime)*3/RIFLE_SHAKE_TIME);
muzzlebounce[YAW] += client->sniperRifleMuzzleYaw*cos(1.0-(level.time - client->sniperRifleFiredTime)*3/RIFLE_SHAKE_TIME);

View file

@ -695,8 +695,8 @@ float G_GetWeaponSpread( int weapon ) {
if ( g_userAim.integer ) {
// these should be higher since they become erratic if aiming is out
switch ( weapon ) {
case WP_LUGER: return 400;
case WP_SILENCER: return 900;
case WP_LUGER: return 200;
case WP_SILENCER: return 100;//900; // make silencer very accurate
case WP_COLT: return 600;
case WP_AKIMBO: return 700; //----(SA) added
case WP_VENOM: return 1000;

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.
// A user mod should never modify this file
#define Q3_VERSION "RTCWQuest 0.22.0 (Wolf 1.41)"
#define Q3_VERSION "RTCWQuest 0.22.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)

View file

@ -168,7 +168,7 @@ import static android.system.Os.setenv;
//copy_asset("/sdcard/RTCWQuest/Main", "pak0.pk3");
//and the vr weapons
copy_asset("/sdcard/RTCWQuest/Main", "vr_sp_pak_weapons.pk3", false);
copy_asset("/sdcard/RTCWQuest/Main", "z_zvr_weapons.pk3", false);
//and the vr menu pk3
copy_asset("/sdcard/RTCWQuest/Main", "z_rtcwquest_vrmenu.pk3", true);