mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2024-11-14 16:41:20 +00:00
adjust positional factor based on refresh rate
This commit is contained in:
parent
a4c84f214a
commit
142e971388
5 changed files with 17 additions and 17 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -31,21 +31,15 @@ assets/oculussig*
|
|||
Projects/Android/.cxx/*
|
||||
*.json
|
||||
*.bin
|
||||
Projects/Android/.gradle/4.4/fileHashes/fileHashes.lock
|
||||
Projects/Android/.gradle/*
|
||||
*.ser
|
||||
Projects/Android/.idea/codeStyles/Project.xml
|
||||
Projects/Android/.idea/*
|
||||
Projects/Android/.externalNativeBuild/*
|
||||
Projects/Android/.gradle/4.6/fileHashes/fileHashes.lock
|
||||
Projects/Android/.gradle/vcsWorkingDirs/gc.properties
|
||||
drbeef-release-key.keystore
|
||||
assets/pak6.pak
|
||||
Projects/Android/Android.iml
|
||||
Projects/Projects.iml
|
||||
VrSamples-Quake2Quest.iml
|
||||
assets/pak0.pk3
|
||||
assets/sp_pak_weapons.pk3
|
||||
assets/z_zvr_weapons.pk3
|
||||
assets/sp_vpak8.pk3
|
||||
Projects/Android/.gradle/5.4.1/fileHashes/fileHashes.lock
|
||||
Projects/Android/.gradle/5.4.1/gc.properties
|
||||
Projects/Android/.gradle/vcs-1/gc.properties
|
||||
|
|
|
@ -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="46"
|
||||
android:versionName="1.1.8" android:installLocation="auto" >
|
||||
android:versionCode="47"
|
||||
android:versionName="1.1.9" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
|
|
@ -1508,16 +1508,20 @@ void * AppThreadFunction(void * parm ) {
|
|||
{
|
||||
if (SS_MULTIPLIER == 0.0f)
|
||||
{
|
||||
SS_MULTIPLIER = 1.25f;
|
||||
SS_MULTIPLIER = 1.2f;
|
||||
}
|
||||
}
|
||||
else if (vrapi_GetSystemPropertyInt(&java, VRAPI_SYS_PROP_DEVICE_TYPE) == VRAPI_DEVICE_TYPE_OCULUSQUEST2)
|
||||
{
|
||||
if (SS_MULTIPLIER == 0.0f)
|
||||
{
|
||||
//SLightly lower to allow 90hz to work nicely
|
||||
SS_MULTIPLIER = 1.1f;
|
||||
//Lower to allow 90hz to work nicely
|
||||
SS_MULTIPLIER = 1.0f;
|
||||
}
|
||||
else if (SS_MULTIPLIER > 1.2F)
|
||||
{
|
||||
SS_MULTIPLIER = 1.2f;
|
||||
}
|
||||
} else {
|
||||
//Don't know what headset this is!? abort
|
||||
return NULL;
|
||||
|
|
|
@ -416,13 +416,15 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
//Positional movement speed correction for when we are not hitting target framerate
|
||||
static double lastframetime = 0;
|
||||
int refresh = GetRefresh();
|
||||
double newframetime = GetTimeInMilliSeconds();
|
||||
float multiplier = (float)((1000.0 / GetRefresh()) / (newframetime - lastframetime));
|
||||
float multiplier = (float)((1000.0 / refresh) / (newframetime - lastframetime));
|
||||
lastframetime = newframetime;
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-vr.hmdposition_delta[0] * vr_positional_factor->value * multiplier,
|
||||
vr.hmdposition_delta[2] * vr_positional_factor->value * multiplier, - vr.hmdorientation[YAW], v);
|
||||
float factor = (refresh / 72.0F) * vr_positional_factor->value; // adjust positional factor based on refresh rate
|
||||
rotateAboutOrigin(-vr.hmdposition_delta[0] * factor * multiplier,
|
||||
vr.hmdposition_delta[2] * factor * multiplier, - vr.hmdorientation[YAW], v);
|
||||
positional_movementSideways = v[0];
|
||||
positional_movementForward = v[1];
|
||||
|
||||
|
|
|
@ -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 1.1.8 (Wolf 1.41)"
|
||||
#define Q3_VERSION "RTCWQuest 1.1.9 (Wolf 1.41)"
|
||||
// ver 1.0.0 - release
|
||||
// ver 1.0.1 - post-release work
|
||||
// ver 1.1.0 - patch 1 (12/12/01)
|
||||
|
|
Loading…
Reference in a new issue