mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-23 18:30:53 +00:00
Multiple FIxes
- Y button for 3rd person camera mode - X button for "Gesture" (not quite a taunt..) - Weapon will auto-realign in multiplayer now, so B button is crouch - When weapon auto-realigns, playspace will auto recenter too - Attempt to prevent footstep sound if player hmd movement is small - Hopefully prevent CD key request from being shown - Don't allow camera to orbit when winning on Team Arena
This commit is contained in:
parent
02e2957e39
commit
4f14c4547c
11 changed files with 42 additions and 37 deletions
|
@ -2,8 +2,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.ioq3quest"
|
||||
android:installLocation="preferExternal"
|
||||
android:versionCode="15"
|
||||
android:versionName="0.10.1">
|
||||
android:versionCode="16"
|
||||
android:versionName="0.11.0">
|
||||
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
|
||||
<uses-feature android:glEsVersion="0x00030001" />
|
||||
|
||||
|
|
|
@ -157,8 +157,8 @@ static void CG_scrollScoresUp_f( void) {
|
|||
|
||||
|
||||
static void CG_spWin_f( void) {
|
||||
trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
// trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
// trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
trap_Cvar_Set("cg_thirdPerson", "1");
|
||||
trap_Cvar_Set("cg_thirdPersonAngle", "0");
|
||||
trap_Cvar_Set("cg_thirdPersonRange", "100");
|
||||
|
@ -168,8 +168,8 @@ static void CG_spWin_f( void) {
|
|||
}
|
||||
|
||||
static void CG_spLose_f( void) {
|
||||
trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
// trap_Cvar_Set("cg_cameraOrbit", "2");
|
||||
// trap_Cvar_Set("cg_cameraOrbitDelay", "35");
|
||||
trap_Cvar_Set("cg_thirdPerson", "1");
|
||||
trap_Cvar_Set("cg_thirdPersonAngle", "0");
|
||||
trap_Cvar_Set("cg_thirdPersonRange", "100");
|
||||
|
|
|
@ -2692,9 +2692,10 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
|
|||
cg.refdef.vieworg[2] += vr->hmdposition[1] * worldscale;
|
||||
if (cg.snap->ps.stats[STAT_HEALTH] > 0)
|
||||
{
|
||||
vec3_t pos;
|
||||
vec3_t pos, hmdposition;
|
||||
VectorClear(pos);
|
||||
rotateAboutOrigin(vr->hmdposition[2], vr->hmdposition[0],
|
||||
VectorSubtract(vr->hmdposition, vr->hmdorigin, hmdposition);
|
||||
rotateAboutOrigin(hmdposition[2], hmdposition[0],
|
||||
cg.refdefViewAngles[YAW] - vr->weaponangles[YAW], pos);
|
||||
VectorScale(pos, worldscale, pos);
|
||||
VectorSubtract(cg.refdef.vieworg, pos, cg.refdef.vieworg);
|
||||
|
|
|
@ -23,6 +23,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// cg_event.c -- handle entity events at snapshot or playerstate transitions
|
||||
|
||||
#include "cg_local.h"
|
||||
#include "../vr/vr_clientinfo.h"
|
||||
|
||||
|
||||
extern vr_clientinfo_t* vr;
|
||||
|
||||
// for the voice chats
|
||||
#ifdef MISSIONPACK
|
||||
|
@ -887,6 +891,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
DEBUGNAME("EV_PLAYER_TELEPORT_IN");
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.teleInSound );
|
||||
CG_SpawnEffect( position);
|
||||
vr->realign_weapon = qtrue; // auto trigger weapon re-align
|
||||
break;
|
||||
|
||||
case EV_PLAYER_TELEPORT_OUT:
|
||||
|
|
|
@ -263,8 +263,9 @@ void CG_CalculateVRWeaponPosition( vec3_t origin, vec3_t angles, qboolean crossh
|
|||
!crosshair)
|
||||
{
|
||||
//Use absolute position for the faked 6DoF for multiplayer
|
||||
vec3_t offset;
|
||||
VectorCopy(vr->weaponposition, offset);
|
||||
vec3_t offset, weaponposition;
|
||||
VectorSubtract(vr->weaponposition, vr->hmdorigin, weaponposition);
|
||||
VectorCopy(weaponposition, offset);
|
||||
offset[1] = vr->weaponoffset[1]; // up/down is index 1 in this case
|
||||
CG_ConvertFromVR(offset, cg.refdef.vieworg, origin);
|
||||
origin[2] -= PLAYER_HEIGHT;
|
||||
|
|
|
@ -604,6 +604,7 @@ void CL_FinishMove( usercmd_t *cmd ) {
|
|||
|
||||
if (vr.realign_weapon)
|
||||
{
|
||||
VectorCopy(vr.hmdposition, vr.hmdorigin);
|
||||
vr.realign_weapon_pitch -= (cl.snap.ps.viewangles[PITCH]-vr.weaponangles[PITCH]) ;
|
||||
vr.realign_weapon = qfalse;
|
||||
}
|
||||
|
|
|
@ -1345,18 +1345,19 @@ static void PM_Footsteps( void ) {
|
|||
}
|
||||
|
||||
// if not trying to move
|
||||
if ( !pm->cmd.forwardmove && !pm->cmd.rightmove ) {
|
||||
if ( pm->xyspeed < 5 ) {
|
||||
pm->ps->bobCycle = 0; // start at beginning of cycle again
|
||||
if ( pm->ps->pm_flags & PMF_DUCKED ) {
|
||||
PM_ContinueLegsAnim( LEGS_IDLECR );
|
||||
} else {
|
||||
PM_ContinueLegsAnim( LEGS_IDLE );
|
||||
}
|
||||
if (( !pm->cmd.forwardmove && !pm->cmd.rightmove ) ||
|
||||
( pm->xyspeed < 10 ))
|
||||
{
|
||||
pm->ps->bobCycle = 0; // start at beginning of cycle again
|
||||
if ( pm->ps->pm_flags & PMF_DUCKED ) {
|
||||
PM_ContinueLegsAnim( LEGS_IDLECR );
|
||||
} else {
|
||||
PM_ContinueLegsAnim( LEGS_IDLE );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
footstep = qfalse;
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ static cvarTable_t cvarTable[] = {
|
|||
{ &ui_server15, "server15", "", CVAR_ARCHIVE },
|
||||
{ &ui_server16, "server16", "", CVAR_ARCHIVE },
|
||||
|
||||
{ &ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM },
|
||||
{ &ui_cdkeychecked, "ui_cdkeychecked", "1", CVAR_ROM },
|
||||
{ &ui_ioq3, "ui_ioq3", "1", CVAR_ROM },
|
||||
{ NULL, "g_localTeamPref", "", 0 }
|
||||
};
|
||||
|
|
|
@ -5815,7 +5815,7 @@ static cvarTable_t cvarTable[] = {
|
|||
{ &ui_server14, "server14", "", CVAR_ARCHIVE },
|
||||
{ &ui_server15, "server15", "", CVAR_ARCHIVE },
|
||||
{ &ui_server16, "server16", "", CVAR_ARCHIVE },
|
||||
{ &ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM },
|
||||
{ &ui_cdkeychecked, "ui_cdkeychecked", "1", CVAR_ROM },
|
||||
{ &ui_new, "ui_new", "0", CVAR_TEMP },
|
||||
{ &ui_debug, "ui_debug", "0", CVAR_TEMP },
|
||||
{ &ui_initialized, "ui_initialized", "0", CVAR_TEMP },
|
||||
|
|
|
@ -17,6 +17,7 @@ typedef struct {
|
|||
int clientNum;
|
||||
|
||||
vec3_t hmdposition;
|
||||
vec3_t hmdorigin; //used to recenter the mp fake 6DoF playspace
|
||||
vec3_t hmdposition_last; // Don't use this, it is just for calculating delta!
|
||||
vec3_t hmdposition_delta;
|
||||
|
||||
|
|
|
@ -413,18 +413,9 @@ static void IN_VRButtonsChanged( qboolean isRightController, uint32_t buttons )
|
|||
}
|
||||
|
||||
if ((buttons & ovrButton_B) && !(controller->buttons & ovrButton_B)) {
|
||||
if ( !com_sv_running || !com_sv_running->integer )
|
||||
{
|
||||
vr.realign_weapon = qtrue;
|
||||
} else {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, 'c', qtrue, 0, NULL);
|
||||
}
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, 'c', qtrue, 0, NULL);
|
||||
} else if (!(buttons & ovrButton_B) && (controller->buttons & ovrButton_B)) {
|
||||
if ( !com_sv_running || !com_sv_running->integer )
|
||||
{
|
||||
} else {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, 'c', qfalse, 0, NULL);
|
||||
}
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, 'c', qfalse, 0, NULL);
|
||||
}
|
||||
|
||||
if (isRightController) {
|
||||
|
@ -462,17 +453,21 @@ static void IN_VRButtonsChanged( qboolean isRightController, uint32_t buttons )
|
|||
}
|
||||
}
|
||||
|
||||
//Taunt / Gesture
|
||||
if ((buttons & ovrButton_X) && !(controller->buttons & ovrButton_X)) {
|
||||
//sendButtonActionSimple("fraglimit 1");
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qtrue, 0, NULL);
|
||||
sendButtonActionSimple("+button3");
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qtrue, 0, NULL);
|
||||
} else if (!(buttons & ovrButton_X) && (controller->buttons & ovrButton_X)) {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qfalse, 0, NULL);
|
||||
sendButtonActionSimple("-button3");
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qfalse, 0, NULL);
|
||||
}
|
||||
|
||||
if ((buttons & ovrButton_Y) && !(controller->buttons & ovrButton_Y)) {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qtrue, 0, NULL);
|
||||
int thirdPerson = Cvar_VariableIntegerValue("cg_thirdPerson");
|
||||
Cvar_SetValue("cg_thirdPerson", 1-thirdPerson);
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qtrue, 0, NULL);
|
||||
} else if (!(buttons & ovrButton_Y) && (controller->buttons & ovrButton_Y)) {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qfalse, 0, NULL);
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qfalse, 0, NULL);
|
||||
}
|
||||
|
||||
controller->buttons = buttons;
|
||||
|
|
Loading…
Reference in a new issue