mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-04-22 23:11:02 +00:00
Few small fixes
back pack don't fire haptics when enemies fire etc
This commit is contained in:
parent
ff2c351549
commit
3bb4b5f274
4 changed files with 20 additions and 16 deletions
|
@ -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="5"
|
||||
android:versionName="0.5.0" android:installLocation="auto" >
|
||||
android:versionCode="6"
|
||||
android:versionName="0.6.0" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
|
|
@ -12,6 +12,7 @@ Authors : Simon Brown
|
|||
#include <VrApi_SystemUtils.h>
|
||||
#include <VrApi_Input.h>
|
||||
#include <VrApi_Types.h>
|
||||
#include <android/keycodes.h>
|
||||
|
||||
#include "VrInput.h"
|
||||
#include "VrCvars.h"
|
||||
|
@ -202,14 +203,14 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
} else{
|
||||
if (dominantGripPushed) {
|
||||
//Initiate knife from backpack mode
|
||||
sendButtonActionSimple("weapon 0");
|
||||
sendButtonActionSimple("weapon 1");
|
||||
int channel = (vr_control_scheme->integer >= 10) ? 0 : 1;
|
||||
RTCWVR_Vibrate(80, channel, 0.8); // vibrate to let user know they switched
|
||||
grabMeleeWeapon = 1;
|
||||
}
|
||||
}
|
||||
} else if (grabMeleeWeapon == 1 && !dominantGripPushed) {
|
||||
//Restores last used weapon
|
||||
//Restores last used weapon if possible
|
||||
sendButtonActionSimple("weaplastused");
|
||||
grabMeleeWeapon = 0;
|
||||
}
|
||||
|
@ -263,7 +264,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
//in meantime, then it wouldn't stop the gun firing and it would get stuck
|
||||
static bool firingPrimary = false;
|
||||
|
||||
if (!firingPrimary && dominantGripPushed && (GetTimeInMilliSeconds() - dominantGripPushTime) > vr_reloadtimeoutms->integer && !vr.scopedweapon)
|
||||
if (!firingPrimary && dominantGripPushed && (GetTimeInMilliSeconds() - dominantGripPushTime) > vr_reloadtimeoutms->integer && !vr.scopedweapon && !grabMeleeWeapon)
|
||||
{
|
||||
//Fire Secondary
|
||||
if (((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
|
@ -288,7 +289,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
if ((pDominantTrackedRemoteNew->Buttons & domButton1) !=
|
||||
(pDominantTrackedRemoteOld->Buttons & domButton1) &&
|
||||
ducked != DUCK_CROUCHED) {
|
||||
ducked = (pDominantTrackedRemoteNew->Buttons & domButton1) ? DUCK_BUTTON : DUCK_NOTDUCKED;
|
||||
ducked = (pDominantTrackedRemoteNew->Buttons & domButton1) ? DUCK_BUTTON
|
||||
: DUCK_NOTDUCKED;
|
||||
sendButtonAction("+movedown", (pDominantTrackedRemoteNew->Buttons & domButton1));
|
||||
}
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ void Sys_PumpEvents( void );
|
|||
#elif defined __axp__
|
||||
#define CPUSTRING "linux-alpha"
|
||||
#elif defined ARM
|
||||
#define CPUSTRING "linux-arm"
|
||||
#define CPUSTRING "Oculus Quest"
|
||||
#else
|
||||
#define CPUSTRING "linux-other"
|
||||
#endif
|
||||
|
|
|
@ -959,11 +959,12 @@ void Bullet_Fire( gentity_t *ent, float spread, int damage ) {
|
|||
|
||||
LOGI("Bullet_Fire %i %i %i",(int)end[0],(int)end[1],(int)end[2]);
|
||||
|
||||
trap_Vibrate(100, gVR->right_handed ? 1 : 0, 1.0);
|
||||
if (gVR->weapon_stabilised)
|
||||
{
|
||||
trap_Vibrate(100, gVR->right_handed ? 0 : 1, 0.7);
|
||||
}
|
||||
if (!ent->aiCharacter) {
|
||||
trap_Vibrate(100, gVR->right_handed ? 1 : 0, 1.0);
|
||||
if (gVR->weapon_stabilised) {
|
||||
trap_Vibrate(100, gVR->right_handed ? 0 : 1, 0.7);
|
||||
}
|
||||
}
|
||||
|
||||
//If we have an autoaim target and player shooting..
|
||||
if (g_autoAimEntity && !(ent->r.svFlags& SVF_CASTAI))
|
||||
|
@ -1962,10 +1963,11 @@ void FireWeapon( gentity_t *ent ) {
|
|||
case WP_PANZERFAUST:
|
||||
ent->client->ps.classWeaponTime = level.time; // JPW NERVE
|
||||
Weapon_RocketLauncher_Fire( ent, aimSpreadScale );
|
||||
trap_Vibrate(200, gVR->right_handed ? 1 : 0, 1.0);
|
||||
if (gVR->weapon_stabilised)
|
||||
{
|
||||
trap_Vibrate(200, gVR->right_handed ? 0 : 1, 0.7);
|
||||
if (!ent->aiCharacter) {
|
||||
trap_Vibrate(200, gVR->right_handed ? 1 : 0, 1.0);
|
||||
if (gVR->weapon_stabilised) {
|
||||
trap_Vibrate(200, gVR->right_handed ? 0 : 1, 0.7);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
|
|
Loading…
Reference in a new issue