diff --git a/neo/d3xp/physics/Physics_Player.cpp b/neo/d3xp/physics/Physics_Player.cpp index 5bf676dbe..b6b79651a 100644 --- a/neo/d3xp/physics/Physics_Player.cpp +++ b/neo/d3xp/physics/Physics_Player.cpp @@ -1528,6 +1528,23 @@ void idPhysics_Player::CheckDuck() // but turns out the walk anim with the waist IK doesn't look too terrible for now // of course, I haven't tested crouching EVERYWHERE in the game yet..... + { + static int currentZ; + currentZ = pm_normalviewheight.GetFloat() + commonVr->poseHmdBodyPositionDelta.z; + + if ( currentZ <= ( pm_crouchheight.GetFloat() + 2.0f ) ) // give a little wiggle room. + { + playerSpeed = crouchSpeed; + maxZ = pm_crouchheight.GetFloat(); + } + else + { + maxZ = pm_normalheight.GetFloat(); + } + + } + + /* this code makes the bounding box reflect the exact player height { maxZ = pm_normalviewheight.GetFloat() + commonVr->poseHmdBodyPositionDelta.z; maxZ = (int)maxZ; // if this is not cast as an int, it crashes the savegame file!!!!!!! WTF? @@ -1538,6 +1555,8 @@ void idPhysics_Player::CheckDuck() playerSpeed = crouchSpeed; } } + + */ else { diff --git a/neo/framework/common_frame.cpp b/neo/framework/common_frame.cpp index 5dd28f4cb..b77c9318b 100644 --- a/neo/framework/common_frame.cpp +++ b/neo/framework/common_frame.cpp @@ -709,15 +709,15 @@ void idCommonLocal::Frame() playerd = commonVr->playerDead; wasl = commonVr->wasLoaded; - common->Printf( "Pause diag: ingame = %d, VR_GAME_PAUSED = %d, pausegame = %d, game->isShellactive = %d playerdead = %d\n", ingame, commonVr->VR_GAME_PAUSED, pauseGame, game->Shell_IsActive(), commonVr->playerDead ); - common->Printf( "Pause diag: PDAforcetoggle = %d, PDAforced = %d, savingLoading = %d, wasloaded = %d\n", commonVr->PDAforcetoggle, commonVr->PDAforced, commonVr->gameSavingLoading, commonVr->wasLoaded ); + //common->Printf( "Pause diag: ingame = %d, VR_GAME_PAUSED = %d, pausegame = %d, game->isShellactive = %d playerdead = %d\n", ingame, commonVr->VR_GAME_PAUSED, pauseGame, game->Shell_IsActive(), commonVr->playerDead ); + //common->Printf( "Pause diag: PDAforcetoggle = %d, PDAforced = %d, savingLoading = %d, wasloaded = %d\n", commonVr->PDAforcetoggle, commonVr->PDAforced, commonVr->gameSavingLoading, commonVr->wasLoaded ); } if ( ( commonVr->VR_GAME_PAUSED || commonVr->PDAforced ) && !common->Dialog().IsDialogActive() && !game->Shell_IsActive() ) { // the pda has been forced up, but there is no active shell or dialog. // force everything closed. - common->Printf( "Pause 1 setting forcetoggle\n" ); + //common->Printf( "Pause 1 setting forcetoggle\n" ); commonVr->PDAforcetoggle = true; // tell the pda check code to force it down. commonVr->VR_GAME_PAUSED = false; } @@ -740,7 +740,7 @@ void idCommonLocal::Frame() { if ( !commonVr->playerDead ) { - common->Printf( "Pause 2 setting forcetoggle\n" ); + //common->Printf( "Pause 2 setting forcetoggle\n" ); commonVr->PDAforcetoggle = true; } } diff --git a/neo/vr/Vr.cpp b/neo/vr/Vr.cpp index 082ad06a8..e82e11e87 100644 --- a/neo/vr/Vr.cpp +++ b/neo/vr/Vr.cpp @@ -19,7 +19,6 @@ idCVar vr_pixelDensity( "vr_pixelDensity", "1.25", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_GAME, "" ); idCVar vr_vignette( "vr_vignette", "1", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "unused" ); -idCVar vr_FBOAAmode( "vr_FBOAAmode", "1", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_RENDERER, "Antialiasing mode. 0 = Disabled 1 = MSAA 2= FXAA\n" ); idCVar vr_enable( "vr_enable", "1", CVAR_INTEGER | CVAR_ARCHIVE | CVAR_GAME, "Enable VR mode. 0 = Disabled 1 = Enabled." ); idCVar vr_FBOscale( "vr_FBOscale", "1.0", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_RENDERER, "unused" ); idCVar vr_scale( "vr_scale", "1.0", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_GAME, "unused" ); @@ -525,20 +524,21 @@ void iVr::HMDInitializeDistortion() if ( !fboCreated ) { // create the FBOs if needed. - VR_AAmode = vr_FBOAAmode.GetInteger(); - + VR_AAmode = r_multiSamples.GetInteger() == 0 ? VR_AA_NONE : VR_AA_MSAA; + common->Printf( "vr_FBOAAmode %d r_multisamples %d\n", VR_AAmode, r_multiSamples.GetInteger() ); - //if ( VR_AAmode == VR_AA_MSAA && r_multiSamples.GetInteger() == 0 ) VR_AAmode = VR_AA_NONE; - + + /* if ( VR_AAmode == VR_AA_FXAA ) {// enable FXAA VR_AAmode = VR_AA_NONE; } + */ if ( VR_AAmode == VR_AA_MSAA ) - {// enable MSAA + { // enable MSAA GL_CheckErrors(); common->Printf( "Creating %d x %d MSAA framebuffer\n", rendertarget.w, rendertarget.h );