- ingame menu working
- Fix for scope "head aim" issue
This commit is contained in:
Simon 2020-07-25 11:01:44 +01:00
parent 52f60fc309
commit 48d9cb9e7b
9 changed files with 38 additions and 42 deletions

View file

@ -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="18"
android:versionName="0.18.0" android:installLocation="auto" >
android:versionCode="19"
android:versionName="0.19.0" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -145,8 +145,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
sendButtonActionSimple("weapalt");
} else if (vr.scopeengaged && !scopeready) {
//Set this here so we don't retrigger scope by accident too soon
ALOGV("**WEAPON EVENT** vr.scopeengaged = qfalse");
vr.scopeengaged = qfalse;
ALOGV("**WEAPON EVENT** disable scope mode");
sendButtonActionSimple("weapalt");
RTCWVR_ResyncClientYawWithGameYaw();
}

View file

@ -3575,7 +3575,8 @@ void CG_AddViewWeapon( playerState_t *ps ) {
if (trap_Cvar_VariableIntegerValue("vr_lasersight") != 0 &&
cgVR->backpackitemactive == 0 &&
cg.predictedPlayerState.stats[STAT_HEALTH] > 0 &&
!cgVR->screen)
!cgVR->screen &&
!cgVR->scopeengaged)
{
switch (ps->weapon)
{
@ -4245,6 +4246,20 @@ void CG_SetSniperZoom( int lastweap, int newweap ) {
int zoomindex;
float shake = 0;
//Do this here to set scope engagement
switch ( newweap ) {
case WP_SNIPERRIFLE:
case WP_SNOOPERSCOPE:
case WP_FG42SCOPE:
Com_Printf("**WEAPON EVENT** cgVR->scopeengaged = qtrue");
cgVR->scopeengaged = qtrue;
break;
default:
Com_Printf("**WEAPON EVENT** cgVR->scopeengaged = qfalse");
cgVR->scopeengaged = qfalse;
break;
}
if ( lastweap == newweap ) {
return;
}
@ -4252,24 +4267,7 @@ void CG_SetSniperZoom( int lastweap, int newweap ) {
cg.zoomval = 0;
cg.zoomedScope = 0;
// check for fade-outs
switch ( lastweap ) {
case WP_SNIPERRIFLE:
// cg.zoomedScope = 500; // TODO: add to zoomTable
// cg.zoomTime = cg.time;
break;
case WP_SNOOPERSCOPE:
// cg.zoomedScope = 500; // TODO: add to zoomTable
// cg.zoomTime = cg.time;
break;
case WP_FG42SCOPE:
// cg.zoomedScope = 1; // TODO: add to zoomTable
// cg.zoomTime = cg.time;
break;
}
switch ( newweap ) {
switch ( newweap ) {
default:
return; // no sniper zoom, get out.
@ -4295,8 +4293,6 @@ void CG_SetSniperZoom( int lastweap, int newweap ) {
break;
}
cgVR->scopeengaged = cg.zoomedScope != 0;
// if(shake) {
// (SA) all shake disabled 11/12
// CG_StartShakeCamera( shake, 1000, cg.snap->ps.origin, 100 );

View file

@ -2341,10 +2341,10 @@ void PM_CheckForReload( int weapon ) {
}
PM_BeginWeaponChange( weapon, weapAlts[weapon], doReload );
#ifdef CGAMEDLL
cgVR->scopeengaged = qfalse;
//cgVR->scopeengaged = qfalse;
#endif
#ifdef GAMEDLL
gVR->scopeengaged = qfalse;
//gVR->scopeengaged = qfalse;
#endif
}
return;
@ -2399,10 +2399,10 @@ void PM_CheckForReload( int weapon ) {
//Reloading will always disengage the scope
#ifdef CGAMEDLL
cgVR->scopeengaged = qfalse;
//cgVR->scopeengaged = qfalse;
#endif
#ifdef GAMEDLL
gVR->scopeengaged = qfalse;
//gVR->scopeengaged = qfalse;
#endif
}

View file

@ -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 0.18.0 (Wolf 1.41)"
#define Q3_VERSION "RTCWQuest 0.19.0 (Wolf 1.41)"
// ver 1.0.0 - release
// ver 1.0.1 - post-release work
// ver 1.1.0 - patch 1 (12/12/01)

View file

@ -15,7 +15,7 @@ menuDef {
onClose {
uiScript saveControls
}
onopen { hide grpControls ; show look ; uiScript loadControls }
onopen { hide grpControls ; show ingame_vr ; uiScript loadControls }
@ -88,7 +88,7 @@ itemDef
itemDef {
name vr
name ingame_vr
group grpControls
text "Control Scheme: "
type ITEM_TYPE_MULTI
@ -107,7 +107,7 @@ itemDef
itemDef {
name vr
name ingame_vr
group grpControls
text "Teleport: "
type ITEM_TYPE_YESNO
@ -124,7 +124,7 @@ itemDef
}
itemDef {
name vr
name ingame_vr
group grpControls
type ITEM_TYPE_YESNO
text "Laser Sight: "
@ -142,7 +142,7 @@ itemDef
itemDef {
name vr
name ingame_vr
group grpControls
type ITEM_TYPE_SLIDER
text "Height Adjust:"
@ -160,7 +160,7 @@ itemDef
itemDef {
name vr
name ingame_vr
group grpControls
type ITEM_TYPE_SLIDER
text "Turn Angle ( <= 10 for smooth turn):"
@ -178,7 +178,7 @@ itemDef
itemDef {
name vr
name ingame_vr
group grpControls
type ITEM_TYPE_YESNO
text "Gaze Movement Direction: "
@ -195,7 +195,7 @@ itemDef
}
itemDef {
name vr
name ingame_vr
group grpControls
type ITEM_TYPE_SLIDER
text "Movement Speed:"

Binary file not shown.

View file

@ -162,16 +162,16 @@ import static android.system.Os.setenv;
new File("/sdcard/RTCWQuest/Main").mkdirs();
//Copy the weapon adjustment config
copy_asset("/sdcard/RTCWQuest/Main", "weapons_vr.cfg");
copy_asset("/sdcard/RTCWQuest/Main", "weapons_vr.cfg", false);
//and the demo version
//copy_asset("/sdcard/RTCWQuest/Main", "pak0.pk3");
//and the vr weapons
copy_asset("/sdcard/RTCWQuest/Main", "vr_sp_pak_weapons.pk3");
copy_asset("/sdcard/RTCWQuest/Main", "vr_sp_pak_weapons.pk3", false);
//and the vr menu pk3
copy_asset("/sdcard/RTCWQuest/Main", "z_rtcwquest_vrmenu.pk3");
copy_asset("/sdcard/RTCWQuest/Main", "z_rtcwquest_vrmenu.pk3", true);
//Read these from a file and pass through
commandLineParams = new String("rtcw");
@ -209,9 +209,9 @@ import static android.system.Os.setenv;
mNativeHandle = GLES3JNILib.onCreate( this, commandLineParams );
}
public void copy_asset(String path, String name) {
public void copy_asset(String path, String name, boolean force) {
File f = new File(path + "/" + name);
if (!f.exists()) {
if (!f.exists() || force) {
//Ensure we have an appropriate folder
String fullname = path + "/" + name;