mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2024-11-24 21:12:17 +00:00
Added quick save/load
This commit is contained in:
parent
fafa72f3ed
commit
bacfc279b6
2 changed files with 52 additions and 30 deletions
17
.gitignore
vendored
17
.gitignore
vendored
|
@ -26,25 +26,16 @@ $RECYCLE.BIN/
|
|||
*.ap_
|
||||
*.class
|
||||
projects/Android/build/*
|
||||
projects/Android/.idea/*
|
||||
projects/Android/jni/SupportLibs/*
|
||||
assets/oculussig*
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/android_gradle_build.json
|
||||
Projects/Android/.cxx/ndkBuild/*
|
||||
Projects/Android/.cxx/*
|
||||
*.json
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/ndkBuild_build_command.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/ndkBuild_build_output.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/release/arm64-v8a/ndkBuild_build_command.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt
|
||||
Projects/Android/.externalNativeBuild/*
|
||||
*.bin
|
||||
Projects/Android/.gradle/*
|
||||
*.ser
|
||||
Projects/Android/.idea/codeStyles/Project.xml
|
||||
*.xml
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt
|
||||
Projects/Android/.externalNativeBuild/ndkBuild/release/arm64-v8a/ndkBuild_build_output.txt
|
||||
Projects/Android/.gradle/4.6/fileHashes/fileHashes.lock
|
||||
Projects/Android/.gradle/vcsWorkingDirs/gc.properties
|
||||
Projects/Android/.gradle/*
|
||||
drbeef-release-key.keystore
|
||||
Projects/Android/.idea/.name
|
||||
|
|
|
@ -1476,16 +1476,16 @@ static void weaponHaptics()
|
|||
break;
|
||||
case IT_LIGHTNING:
|
||||
{
|
||||
hapticInterval = 10;
|
||||
hapticInterval = 100;
|
||||
hapticLevel = lhrandom(0.0, 0.8f);
|
||||
hapticLength = 10;
|
||||
hapticLength = 80;
|
||||
}
|
||||
break;
|
||||
case IT_SUPER_LIGHTNING:
|
||||
{
|
||||
hapticInterval = 10;
|
||||
hapticInterval = 100;
|
||||
hapticLevel = lhrandom(0.3, 1.0f);
|
||||
hapticLength = 10;
|
||||
hapticLength = 60;
|
||||
}
|
||||
break;
|
||||
case IT_AXE:
|
||||
|
@ -1849,6 +1849,26 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
ovrButton_Trigger, K_MOUSE1);
|
||||
}
|
||||
|
||||
static bool canUseQuickSave = false;
|
||||
if (canUseQuickSave)
|
||||
{
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_X) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_X) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_X)) {
|
||||
Cbuf_InsertText("save quick\n");
|
||||
|
||||
//Vibrate to let user know they successfully saved
|
||||
SCR_CenterPrint("Quick Saved");
|
||||
Android_Vibrate(500, cl_righthanded.integer ? 0 : 1, 1.0);
|
||||
}
|
||||
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_Y) &&
|
||||
(leftTrackedRemoteState_new.Buttons & ovrButton_Y) !=
|
||||
(leftTrackedRemoteState_old.Buttons & ovrButton_Y)) {
|
||||
Cbuf_InsertText("load quick");
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifndef NDEBUG
|
||||
//Give all weapons and all ammo and god mode
|
||||
if ((leftTrackedRemoteState_new.Buttons & ovrButton_X) &&
|
||||
|
@ -1866,6 +1886,17 @@ static void ovrApp_HandleInput( ovrApp * app )
|
|||
(leftTrackedRemoteState_old.Buttons & ovrButton_Y)) {
|
||||
textInput = !textInput;
|
||||
}
|
||||
}
|
||||
|
||||
if (offHandRemoteTracking->Status & (VRAPI_TRACKING_STATUS_POSITION_TRACKED | VRAPI_TRACKING_STATUS_POSITION_VALID)) {
|
||||
canUseQuickSave = false;
|
||||
}
|
||||
else if (!canUseQuickSave) {
|
||||
canUseQuickSave = true;
|
||||
|
||||
//Vibrate to let user know they can quick save
|
||||
Android_Vibrate(500, cl_righthanded.integer ? 0 : 1, 1.0);
|
||||
}
|
||||
|
||||
|
||||
leftTrackedRemoteState_old = leftTrackedRemoteState_new;
|
||||
|
|
Loading…
Reference in a new issue