Updated Menu + Fixes

Fixed Snap Turns
Flashlight broken again (possibly offsets)
This commit is contained in:
Grant Bagwell 2020-12-13 21:29:52 +01:00
parent dac8240cea
commit 480ad0f239
10 changed files with 12 additions and 15 deletions

View file

@ -108,7 +108,7 @@ int argc=0;
enum control_scheme {
RIGHT_HANDED_DEFAULT = 0,
LEFT_HANDED_DEFAULT = 10
LEFT_HANDED_DEFAULT = 1
};
/*

View file

@ -2424,7 +2424,7 @@ void idCommonLocal::Frame( void ) {
// pump all the events
Sys_GenerateEvents();
Doom3Quest_FrameSetup(cvarSystem->GetCVarInteger("vr_controlscheme"));
Doom3Quest_FrameSetup(cvarSystem->GetCVarInteger("vr_weaponHand"));
if (game) {
game->SetVRClientInfo(pVRClientInfo);

View file

@ -1064,7 +1064,8 @@ void idGameLocal::EvaluateVRMoveMode(idVec3 &viewangles, usercmd_t &cmd, int but
}
//GB - Include Dr. Beefs SnapTurn
if ( snapTurn != 0.0 && (commonVr->Sys_Milliseconds() - commonVr->lastComfortTime >= vr_comfortRepeat.GetInteger()) )
//if ( snapTurn != 0.0 && (commonVr->Sys_Milliseconds() - commonVr->lastComfortTime >= vr_comfortRepeat.GetInteger()) )
if ( snapTurn != 0.0 )
{
viewangles[YAW] += snapTurn;
commonVr->lastComfortTime = commonVr->Sys_Milliseconds();

View file

@ -41,6 +41,7 @@ If you have questions concerning this license or the applicable additional terms
#include "GameEdit.h"
#include "PredictedValue.h"
#include "Vr.h"
#include "gamesys/SysCvar.h"
class idAI;

View file

@ -31,8 +31,7 @@ idCVar vr_scale( "vr_scale", "1.0", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_GAME, "Worl
idCVar vr_useFloorHeight( "vr_useFloorHeight", "0", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "0 = Custom eye height. 1 = Marine Eye Height. 2 = Normal View Height. 3 = make floor line up by Doomguy crouching. 4 = make everything line up by scaling world to your height.", 0, 4 );
idCVar vr_normalViewHeight( "vr_normalViewHeight", "73", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_GAME, "Height of player's view while standing, in real world inches." );
//In Menu - needs testing
idCVar vr_weaponHand( "vr_weaponHand", "0", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "Which hand holds weapon.\n 0 = Right hand\n 1 = Left Hand\n", 0, 1 );
//In Menu - don't think gun is working - investigate
idCVar vr_flashlightMode( "vr_flashlightMode", "3", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "Flashlight mount.\n0 = Body\n1 = Head\n2 = Gun\n3= Hand ( if motion controls available.)" );
@ -95,9 +94,6 @@ idCVar vr_joystickMenuMapping( "vr_joystickMenuMapping", "1", CVAR_BOOL | CVAR_A
idCVar vr_deadzonePitch( "vr_deadzonePitch", "90", CVAR_FLOAT | CVAR_GAME | CVAR_ARCHIVE, "Vertical Aim Deadzone", 0, 180 );
idCVar vr_deadzoneYaw( "vr_deadzoneYaw", "30", CVAR_FLOAT | CVAR_GAME | CVAR_ARCHIVE, "Horizontal Aim Deadzone", 0, 180 );
//Not sure if this is used or Dr Beefs setting - not in menu
idCVar vr_comfortDelta( "vr_comfortDelta", "10", CVAR_FLOAT | CVAR_GAME | CVAR_ARCHIVE, "Comfort Mode turning angle ", 0, 180 );
//In menu - Working fine
idCVar vr_weaponSight( "vr_weaponSight", "3", CVAR_INTEGER | CVAR_ARCHIVE, "Weapon Sight.\n 0 = Lasersight\n 1 = Red dot\n 2 = Circle dot\n 3 = Crosshair\n 4 = Beam + Dot\n" );
idCVar vr_weaponSightToSurface( "vr_weaponSightToSurface", "1", CVAR_INTEGER | CVAR_ARCHIVE, "Map sight to surface. 0 = Disabled 1 = Enabled\n" );
@ -207,7 +203,7 @@ idCVar vr_mustEmptyHands( "vr_mustEmptyHands", "0", CVAR_BOOL | CVAR_GAME | CVAR
idCVar vr_contextSensitive( "vr_contextSensitive", "1", CVAR_BOOL | CVAR_GAME | CVAR_ARCHIVE, "Are buttons context sensitive?\n0 = no just map the buttons in the binding window, 1 = yes, context sensitive buttons (default)" );
idCVar vr_dualWield( "vr_dualWield", "2", CVAR_INTEGER | CVAR_GAME | CVAR_ARCHIVE, "Can you use two weapons at once?\n0 = not even fists, 1 = nothing, 2 = only flashlight, 3 = only grenades (VFR), 4 = only grenades/flashlight, 5 = only pistols, 6 = only pistols/flashlight, 7 = only pistols/grenades/flashlight, 8 = yes" );
idCVar vr_debugHands( "vr_debugHands", "0", CVAR_BOOL | CVAR_GAME, "Enable hand/weapon/dual wielding debugging" );
idCVar vr_debugHands( "vr_debugHands", "1", CVAR_BOOL | CVAR_GAME, "Enable hand/weapon/dual wielding debugging" );
idCVar vr_rumbleChainsaw( "vr_rumbleChainsaw", "1", CVAR_BOOL | CVAR_GAME | CVAR_ARCHIVE, "Enable weapon (currently chainsaw only) constant haptic feedback in VR. Not recommended for wireless VR controllers." );
//===================================================================
@ -580,7 +576,7 @@ void iVr::HMDGetOrientation( idAngles &hmdAngles, idVec3 &headPositionDelta, idV
cinematicStartViewYaw = trackingOriginYawOffset;
}
common->Printf( "HMDGetOrientation FramCheck Bail == idLib:: framenumber lf %d ilfn %d rendersplash = %d\n", lastFrame, common->GetFrameNumber(), commonVr->renderingSplash );
//common->Printf( "HMDGetOrientation FramCheck Bail == idLib:: framenumber lf %d ilfn %d rendersplash = %d\n", lastFrame, common->GetFrameNumber(), commonVr->renderingSplash );
return;
}

View file

@ -420,8 +420,6 @@ extern idCVar vr_wristStatMon;
extern idCVar vr_disableWeaponAnimation;
extern idCVar vr_headKick;
extern idCVar vr_weaponHand;
extern idCVar vr_flashlightMode;
extern idCVar vr_flashlightStrict; // Carl
@ -467,7 +465,6 @@ extern idCVar vr_trackingPredictionUserDefined;
extern idCVar vr_deadzonePitch;
extern idCVar vr_deadzoneYaw;
extern idCVar vr_comfortDelta;
extern idCVar vr_weaponSight;
extern idCVar vr_weaponSightToSurface;

View file

@ -2592,8 +2592,7 @@ void idWeapon::PresentWeapon( bool showViewModel, int hand ) {
{
viewWeaponOrigin = playerViewOrigin;
viewWeaponAxis = playerViewAxis;
owner->CalculateViewFlashlightPos( viewWeaponOrigin, viewWeaponAxis, flashlightOffsets[int( currentWeapon )] );
owner->CalculateViewFlashlightPos( viewWeaponOrigin, viewWeaponAxis, flashlightOffsets[owner->hands[vr_weaponHand.GetInteger()].currentWeapon] );
}
else if ( isPlayerLeftHand ) // Koz left hand
{

View file

@ -344,6 +344,8 @@ idCVar net_serverDlBaseURL( "net_serverDlBaseURL", "", CVAR_GAME | CVAR_AR
idCVar net_serverDlTable( "net_serverDlTable", "", CVAR_GAME | CVAR_ARCHIVE, "pak names for which download is provided, separated by ;" );
//In Menu - needs testing
idCVar vr_weaponHand( "vr_weaponHand", "0", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "Which hand holds weapon.\n 0 = Right hand\n 1 = Left Hand\n", 0, 1 );
idCVar vr_ipd( "vr_ipd", "0.065", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "VR IPD" );
idCVar vr_worldscale( "vr_worldscale", "43.0", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "VR World Scale" );
idCVar vr_heightoffset( "vr_heightoffset", "0.0", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "VR Height Offset" );

View file

@ -265,6 +265,7 @@ extern idCVar g_grabberDamping;
extern idCVar g_xp_bind_run_once;
//VR CVARS
extern idCVar vr_weaponHand;
extern idCVar vr_ipd;
extern idCVar vr_worldscale;
extern idCVar vr_heightoffset;

Binary file not shown.