mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2024-11-24 04:51:23 +00:00
Couple of extra fixes
* Two handed weapons * Additional right-hand keys on the rubbish virtual keyboard for function keys * Increased version number
This commit is contained in:
parent
4952cc4d9c
commit
189abfb9a8
5 changed files with 53 additions and 22 deletions
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.quakequest"
|
||||
android:versionCode="17"
|
||||
android:versionName="1.4.9" android:installLocation="auto" >
|
||||
android:versionCode="18"
|
||||
android:versionName="1.4.10"
|
||||
android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
@ -16,7 +17,12 @@
|
|||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<application android:allowBackup="false" android:icon="@drawable/ic_qquest" android:label="@string/quakequest">
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:icon="@drawable/ic_qquest"
|
||||
android:label="@string/quakequest"
|
||||
android:extractNativeLibs="true">
|
||||
|
||||
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2"/>
|
||||
<!-- The activity is the built-in NativeActivity framework class. -->
|
||||
|
|
|
@ -23,8 +23,8 @@ android {
|
|||
abiFilters 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 26
|
||||
}
|
||||
|
||||
task prepareKotlinBuildScriptModel {
|
||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
|
||||
|
|
|
@ -276,6 +276,7 @@ vec3_t hmdorientation;
|
|||
extern float gunangles[3];
|
||||
float weaponOffset[3];
|
||||
float weaponVelocity[3];
|
||||
qboolean weapon_stabilised;
|
||||
|
||||
float vrFOV;
|
||||
|
||||
|
@ -1282,8 +1283,8 @@ int left_grid = 0;
|
|||
char left_lower[3][10] = {"bcfihgdae", "klorqpmjn", "tuwzyxvs "};
|
||||
char left_shift[3][10] = {"BCFIHGDAE", "KLORQPMJN", "TUWZYXVS "};
|
||||
int right_grid = 0;
|
||||
char right_lower[2][10] = {"236987415", "+-)]&[(?0"};
|
||||
char right_shift[2][10] = {"\"*:|._~/#", "%^}>,<{\\@"};
|
||||
char right_lower[3][10] = {"236987415", "+-)]&[(?0", { K_F1, K_F2, K_F3, K_F4, K_F5, K_F6, K_F7, K_F8, 0}};
|
||||
char right_shift[3][10] = {"\"*:|._~/#", "%^}>,<{\\@", { 0, K_F9, 0, K_F12, 0, K_F10, 0, K_F11, 0}};
|
||||
|
||||
char left_grid_map[2][3][3][8] = {
|
||||
{
|
||||
|
@ -1312,27 +1313,27 @@ char left_grid_map[2][3][3][8] = {
|
|||
};
|
||||
|
||||
|
||||
char right_grid_map[2][3][2][8] = {
|
||||
char right_grid_map[2][3][3][8] = {
|
||||
{
|
||||
{
|
||||
"1 2 3", "? + -"
|
||||
"1 2 3", "? + -", "F1 F2 F3"
|
||||
},
|
||||
{
|
||||
"4 5 6", "( 0 )"
|
||||
"4 5 6", "( 0 )", "F8 F4"
|
||||
},
|
||||
{
|
||||
"7 8 9", "[ & ]"
|
||||
"7 8 9", "[ & ]", "F7 F6 F5"
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"/ \" *", "\\ % ^"
|
||||
"/ \" *", "\\ % ^", " F9 "
|
||||
},
|
||||
{
|
||||
"~ # :", "{ @ }"
|
||||
"~ # :", "{ @ }", "F12 F10"
|
||||
},
|
||||
{
|
||||
"_ . |", "< , >"
|
||||
"_ . |", "< , >", " F11 "
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -1501,6 +1502,10 @@ static void weaponHaptics()
|
|||
{
|
||||
timeLastHaptic = timeNow;
|
||||
Android_Vibrate(hapticLength, cl_righthanded.integer ? 1 : 0, hapticLevel);
|
||||
if (weapon_stabilised)
|
||||
{
|
||||
Android_Vibrate(hapticLength, cl_righthanded.integer ? 0 : 1, hapticLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1588,7 +1593,7 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
if ((rightTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) &&
|
||||
(rightTrackedRemoteState_new.Buttons & ovrButton_GripTrigger) !=
|
||||
(rightTrackedRemoteState_old.Buttons & ovrButton_GripTrigger)) {
|
||||
right_grid = (++right_grid) % 2;
|
||||
right_grid = (++right_grid) % 3;
|
||||
}
|
||||
|
||||
char left_char;
|
||||
|
@ -1654,7 +1659,15 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
rightTrackedRemoteState_old = rightTrackedRemoteState_new;
|
||||
|
||||
} else {
|
||||
float distance = sqrtf(powf(offHandRemoteTracking->HeadPose.Pose.Position.x - dominantRemoteTracking->HeadPose.Pose.Position.x, 2) +
|
||||
powf(offHandRemoteTracking->HeadPose.Pose.Position.y - dominantRemoteTracking->HeadPose.Pose.Position.y, 2) +
|
||||
powf(offHandRemoteTracking->HeadPose.Pose.Position.z - dominantRemoteTracking->HeadPose.Pose.Position.z, 2));
|
||||
|
||||
//dominant hand stuff first
|
||||
weapon_stabilised = distance < 0.5f &&
|
||||
(offHandTrackedRemoteState->Buttons & ovrButton_GripTrigger) &&
|
||||
cl.stats[STAT_ACTIVEWEAPON] != IT_AXE;
|
||||
|
||||
{
|
||||
weaponOffset[0] = dominantRemoteTracking->HeadPose.Pose.Position.x - hmdPosition[0];
|
||||
weaponOffset[1] = dominantRemoteTracking->HeadPose.Pose.Position.y - hmdPosition[1];
|
||||
|
@ -1674,6 +1687,18 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
const ovrQuatf quatRemote = dominantRemoteTracking->HeadPose.Pose.Orientation;
|
||||
QuatToYawPitchRoll(quatRemote, vr_weaponpitchadjust.value, gunangles);
|
||||
|
||||
if (weapon_stabilised)
|
||||
{
|
||||
float z = offHandRemoteTracking->HeadPose.Pose.Position.z - dominantRemoteTracking->HeadPose.Pose.Position.z;
|
||||
float x = offHandRemoteTracking->HeadPose.Pose.Position.x - dominantRemoteTracking->HeadPose.Pose.Position.x;
|
||||
float y = offHandRemoteTracking->HeadPose.Pose.Position.y - dominantRemoteTracking->HeadPose.Pose.Position.y;
|
||||
float zxDist = length(x, z);
|
||||
|
||||
if (zxDist != 0.0f && z != 0.0f) {
|
||||
VectorSet(gunangles, -degrees(atanf(y / zxDist)), -degrees(atan2f(x, -z)), gunangles[ROLL]);
|
||||
}
|
||||
}
|
||||
|
||||
gunangles[YAW] += yawOffset;
|
||||
|
||||
//Change laser sight on joystick click
|
||||
|
@ -2199,11 +2224,11 @@ void * AppThreadFunction( void * parm )
|
|||
//AmmarkoV : Query Refresh rates and select maximum..!
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
int numberOfRefreshRates = vrapi_GetSystemPropertyInt(&java,VRAPI_SYS_PROP_NUM_SUPPORTED_DISPLAY_REFRESH_RATES);
|
||||
float refreshRatesArray[16]; //Refresh rates are currently (12/2020) the following 4 : 60.0 / 72.0 / 80.0 / 90.0
|
||||
float refreshRatesArray[16];
|
||||
if (numberOfRefreshRates > 16 ) { numberOfRefreshRates = 16; }
|
||||
vrapi_GetSystemPropertyFloatArray(&java, VRAPI_SYS_PROP_SUPPORTED_DISPLAY_REFRESH_RATES,&refreshRatesArray[0], numberOfRefreshRates);
|
||||
for (int i = 0; i < numberOfRefreshRates; i++) {
|
||||
//ALOGV("Supported refresh rate : %s Hz", refreshRatesArray[i]);
|
||||
//ALOGV("Supported refresh rate : %g Hz", refreshRatesArray[i]);
|
||||
if (maximumSupportedFramerate<refreshRatesArray[i])
|
||||
{
|
||||
maximumSupportedFramerate=refreshRatesArray[i];
|
||||
|
@ -2214,7 +2239,8 @@ void * AppThreadFunction( void * parm )
|
|||
ALOGV("Soft limiting to 90.0 Hz as per John carmack's request ( https://www.onlinepeeps.org/oculus-quest-2-according-to-carmack-in-the-future-also-at-120-hz/ );P");
|
||||
maximumSupportedFramerate=90.0;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
ovrEgl_CreateContext( &appState.Egl, NULL );
|
||||
|
@ -2387,9 +2413,8 @@ void * AppThreadFunction( void * parm )
|
|||
}
|
||||
#endif
|
||||
|
||||
//Set 90hz mode for Quest 2
|
||||
if (hmdType == VRAPI_DEVICE_TYPE_OCULUSQUEST2) {
|
||||
vrapi_SetDisplayRefreshRate(appState.Ovr, 90);
|
||||
ovrResult result = vrapi_SetDisplayRefreshRate(appState.Ovr,maximumSupportedFramerate);
|
||||
}
|
||||
|
||||
// Get the HMD pose, predicted for the middle of the time period during which
|
||||
|
|
|
@ -3597,7 +3597,7 @@ static void M_Credits_Draw (void)
|
|||
" QQQQQQQQ QQQQQQQQ ",
|
||||
" QQQ QQQ ",
|
||||
" Q Q ",
|
||||
" Q Q v1.4.9 ");
|
||||
" Q Q v1.4.10");
|
||||
|
||||
int i, l, linelength, firstline, lastline, lines;
|
||||
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)
|
||||
|
|
Loading…
Reference in a new issue