mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-02-28 22:31:29 +00:00
a few fixes
- Ensure right handed for wepaon calibration - Fix issue with sniper mode fixing yaw after a shot is fired
This commit is contained in:
parent
ed5e665f26
commit
04801b7d19
4 changed files with 21 additions and 12 deletions
|
@ -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="24"
|
android:versionCode="25"
|
||||||
android:versionName="0.21.1" android:installLocation="auto" >
|
android:versionName="0.22.0" 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"/>
|
||||||
|
|
|
@ -29,7 +29,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
||||||
|
|
||||||
{
|
{
|
||||||
//Ensure handedness is set correctly
|
//Ensure handedness is set correctly
|
||||||
vr.right_handed = vr_control_scheme->value < 10;
|
vr.right_handed = vr_control_scheme->value < 10 ||
|
||||||
|
vr_control_scheme->value == 99; // Always right-handed for weapon calibration
|
||||||
|
|
||||||
vr.teleportenabled = vr_teleport->integer != 0;
|
vr.teleportenabled = vr_teleport->integer != 0;
|
||||||
|
|
||||||
|
@ -143,17 +144,25 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
||||||
if (!vr.scopeengaged && scopeready) {
|
if (!vr.scopeengaged && scopeready) {
|
||||||
ALOGV("**WEAPON EVENT** trigger scope mode");
|
ALOGV("**WEAPON EVENT** trigger scope mode");
|
||||||
sendButtonActionSimple("weapalt");
|
sendButtonActionSimple("weapalt");
|
||||||
} else if (vr.scopeengaged && !scopeready) {
|
}
|
||||||
//Set this here so we don't retrigger scope by accident too soon
|
else if (vr.scopeengaged && !scopeready) {
|
||||||
ALOGV("**WEAPON EVENT** vr.scopeengaged = qfalse");
|
ALOGV("**WEAPON EVENT** disable scope mode");
|
||||||
vr.scopeengaged = qfalse;
|
|
||||||
sendButtonActionSimple("weapalt");
|
sendButtonActionSimple("weapalt");
|
||||||
RTCWVR_ResyncClientYawWithGameYaw();
|
|
||||||
}
|
}
|
||||||
lastScopeready = scopeready;
|
lastScopeready = scopeready;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static qboolean scopeEngaged = qfalse;
|
||||||
|
if (scopeEngaged != vr.scopeengaged)
|
||||||
|
{
|
||||||
|
scopeEngaged = vr.scopeengaged;
|
||||||
|
|
||||||
|
//Resync on either transition
|
||||||
|
RTCWVR_ResyncClientYawWithGameYaw();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static qboolean binocularstate = qfalse;
|
static qboolean binocularstate = qfalse;
|
||||||
qboolean binocularsactive = (vr.hasbinoculars && vr.backpackitemactive == 3 &&
|
qboolean binocularsactive = (vr.hasbinoculars && vr.backpackitemactive == 3 &&
|
||||||
(distanceToHMD < BINOCULAR_ENGAGE_DISTANCE) &&
|
(distanceToHMD < BINOCULAR_ENGAGE_DISTANCE) &&
|
||||||
|
|
|
@ -2007,7 +2007,7 @@ void FireWeapon( gentity_t *ent ) {
|
||||||
// viewang[PITCH] -= 6; // handled in clientthink instead
|
// viewang[PITCH] -= 6; // handled in clientthink instead
|
||||||
ent->client->sniperRifleMuzzleYaw = 0;//crandom() * 0.5; // used in clientthink
|
ent->client->sniperRifleMuzzleYaw = 0;//crandom() * 0.5; // used in clientthink
|
||||||
ent->client->sniperRifleMuzzlePitch = 0.8f;
|
ent->client->sniperRifleMuzzlePitch = 0.8f;
|
||||||
ent->client->sniperRifleFiredTime = level.time;
|
//ent->client->sniperRifleFiredTime = level.time;
|
||||||
SetClientViewAngle( ent,viewang );
|
SetClientViewAngle( ent,viewang );
|
||||||
}
|
}
|
||||||
// jpw
|
// jpw
|
||||||
|
@ -2020,7 +2020,7 @@ void FireWeapon( gentity_t *ent ) {
|
||||||
VectorCopy( ent->client->ps.viewangles,viewang );
|
VectorCopy( ent->client->ps.viewangles,viewang );
|
||||||
ent->client->sniperRifleMuzzleYaw = 0;//crandom() * 0.5; // used in clientthink
|
ent->client->sniperRifleMuzzleYaw = 0;//crandom() * 0.5; // used in clientthink
|
||||||
ent->client->sniperRifleMuzzlePitch = 0.9f;
|
ent->client->sniperRifleMuzzlePitch = 0.9f;
|
||||||
ent->client->sniperRifleFiredTime = level.time;
|
//ent->client->sniperRifleFiredTime = level.time;
|
||||||
SetClientViewAngle( ent,viewang );
|
SetClientViewAngle( ent,viewang );
|
||||||
}
|
}
|
||||||
// jpw
|
// jpw
|
||||||
|
@ -2039,7 +2039,7 @@ void FireWeapon( gentity_t *ent ) {
|
||||||
// ent->client->sniperRifleMuzzleYaw = crandom()*0.04; // used in clientthink
|
// ent->client->sniperRifleMuzzleYaw = crandom()*0.04; // used in clientthink
|
||||||
ent->client->sniperRifleMuzzleYaw = 0;
|
ent->client->sniperRifleMuzzleYaw = 0;
|
||||||
ent->client->sniperRifleMuzzlePitch = 0.07f;
|
ent->client->sniperRifleMuzzlePitch = 0.07f;
|
||||||
ent->client->sniperRifleFiredTime = level.time;
|
//ent->client->sniperRifleFiredTime = level.time;
|
||||||
SetClientViewAngle( ent,viewang );
|
SetClientViewAngle( ent,viewang );
|
||||||
}
|
}
|
||||||
case WP_FG42:
|
case WP_FG42:
|
||||||
|
|
|
@ -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 0.21.1 (Wolf 1.41)"
|
#define Q3_VERSION "RTCWQuest 0.22.0 (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)
|
||||||
|
|
Loading…
Reference in a new issue