Correct alignment of tesla lightning
Allow use of inventory items and cycling through using X and Y with grip button pushed
This commit is contained in:
Simon 2020-08-10 18:50:42 +01:00
parent 13672570d7
commit 9e9b6a2377
6 changed files with 38 additions and 10 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="28"
android:versionName="0.23.1" android:installLocation="auto" >
android:versionCode="29"
android:versionName="0.24.0" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -492,6 +492,13 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
remote_movementForward);
static qboolean stopUseItemNextFrame = false;
if (stopUseItemNextFrame)
{
Cbuf_AddText("-useitem\n");
stopUseItemNextFrame = false;
}
if (!canUseQuickSave) {
if (((pOffTrackedRemoteNew->Buttons & offButton1) !=
(pOffTrackedRemoteOld->Buttons & offButton1)) &&
@ -499,19 +506,27 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
if (dominantGripPushed) {
//If cheats enabled, give all weapons/pickups to player
Cbuf_AddText("give all\n");
//Cbuf_AddText("give all\n");
Cbuf_AddText("+useitem\n");
stopUseItemNextFrame = qtrue;
} else {
vr.visible_hud = !vr.visible_hud;
}
}
}
//notebook
//notebook or select "item"
if (!canUseQuickSave) {
if (((pOffTrackedRemoteNew->Buttons & offButton2) !=
(pOffTrackedRemoteOld->Buttons & offButton2)) &&
(pOffTrackedRemoteNew->Buttons & offButton2)) {
sendButtonActionSimple("notebook");
if (dominantGripPushed) {
sendButtonActionSimple("itemprev");
} else {
sendButtonActionSimple("notebook");
}
}
}

View file

@ -2061,6 +2061,8 @@ static float CG_CalculateWeaponPositionAndScale( playerState_t *ps, vec3_t origi
vec3_t adjust;
vec3_t temp_offset;
VectorClear(temp_offset);
VectorClear(adjust);
sscanf(weapon_adjustment, "%f,%f,%f,%f,%f,%f,%f", &scale,
&(temp_offset[0]), &(temp_offset[1]), &(temp_offset[2]),
&(adjust[PITCH]), &(adjust[YAW]), &(adjust[ROLL]));
@ -3175,7 +3177,18 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
angles[ROLL] = crandom() * 10;
AnglesToAxis( angles, flash.axis );
CG_PositionRotatedEntityOnTag( &flash, &gun, "tag_flash" );
if (weaponNum != WP_TESLA) {
CG_PositionRotatedEntityOnTag(&flash, &gun, "tag_flash");
}
else
{
//For the Tesla, set the origin of the flash to be a short distance forward of the controller
vec3_t origin, angles;
CG_CalculateVRWeaponPosition( 0, flash.origin, angles );
vec3_t forward, right, up;
AngleVectors(angles, forward, right, up);
VectorMA( flash.origin, 10, forward, flash.origin );
}
// store this position for other cgame elements to access
cent->pe.gunRefEnt = gun;

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.23.1 (Wolf 1.41)"
#define Q3_VERSION "RTCWQuest 0.24.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

@ -42,7 +42,7 @@ seta vr_weapon_adjustment_12 "0.75,-7.63,7.41,-11.84,-2.80,0.00,0.00"
seta vr_weapon_adjustment_18 "0.50,-8.32,10.40,-4.28,-4.90,0.80,0.00"
seta vr_weapon_adjustment_7 "1.04,-5.51,6.65,-7.55,0.00,0.00,0.00"
seta vr_weapon_adjustment_9 "0.70,-5.01,6.81,13.25,0.00,0.00,0.00"
seta vr_weapon_adjustment_10 "0.75,-2.84,7.29,22.49,0.00,0.00,0.00"
seta vr_weapon_adjustment_10 "0.75,-8.45,5.91,-11.39,0.00,0.00,0.00"
seta vr_weapon_adjustment_13 "0.55,-9.71,8.15,-2.54,0.70,-2.00,0.00"
seta vr_weapon_adjustment_22 "0.59,-10.44,14.52,-19.46,0.00,1.60,0.00"
seta vr_weapon_adjustment_4 "0.55,-8.72,8.28,-0.99,-1.00,-2.00,0.00"

View file

@ -164,8 +164,8 @@ import static android.system.Os.setenv;
//Copy the weapon adjustment config
copy_asset("/sdcard/RTCWQuest/Main", "weapons_vr.cfg", false);
//and the demo version
//copy_asset("/sdcard/RTCWQuest/Main", "pak0.pk3");
//and the demo version - if required
copy_asset("/sdcard/RTCWQuest/Main", "pak0.pk3", false);
//and the vr weapons
copy_asset("/sdcard/RTCWQuest/Main", "z_zvr_weapons.pk3", false);