Few fixes

Don't spin camera on death
Fix mouse cursor getting stuck on left
This commit is contained in:
Simon 2022-10-05 21:54:36 +01:00
parent 851183b90d
commit 086545aa8f
5 changed files with 11 additions and 7 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.jk2quest"
android:versionCode="7"
android:versionName="0.0.6" android:installLocation="auto" >
android:versionCode="8"
android:versionName="0.0.8" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -1270,7 +1270,7 @@ void JKVR_Init()
vr_reloadtimeoutms = Cvar_Get( "vr_reloadtimeoutms", "200", CVAR_ARCHIVE);
vr_positional_factor = Cvar_Get( "vr_positional_factor", "12", CVAR_ARCHIVE);
vr_walkdirection = Cvar_Get( "vr_walkdirection", "0", CVAR_ARCHIVE);
vr_movement_multiplier = Cvar_Get( "vr_movement_multiplier", "0.7", CVAR_ARCHIVE);
vr_movement_multiplier = Cvar_Get( "vr_movement_multiplier", "1.0", CVAR_ARCHIVE);
vr_weapon_pitchadjust = Cvar_Get( "vr_weapon_pitchadjust", "-20.0", CVAR_ARCHIVE);
vr_lasersight = Cvar_Get( "vr_lasersight", "0", CVAR_ARCHIVE);
vr_teleport = Cvar_Get( "vr_teleport", "0", CVAR_ARCHIVE);

View file

@ -211,7 +211,7 @@ float clamp(float _min, float _val, float _max)
void interactWithTouchScreen(bool reset, ovrInputStateTrackedRemote *newState, ovrInputStateTrackedRemote *oldState) {
static float centerYaw = 0;
if (reset || fabs(sinf(DEG2RAD(vr.weaponangles[YAW]-centerYaw))) > 0.5f)
if (reset || Q_isnan(centerYaw) || fabs(sinf(DEG2RAD(vr.weaponangles[YAW]-centerYaw))) > 0.9f)
{
centerYaw = vr.weaponangles[YAW];
}

View file

@ -771,7 +771,9 @@ static void CG_OffsetThirdPersonView( void )
}
}
else if ( cg.predicted_player_state.stats[STAT_HEALTH] <= 0 )
{// if dead, look at killer
{
//Do nothing
/*
if ( MatrixMode )
{
if ( cg.overrides.active & CG_OVERRIDE_3RD_PERSON_ANG )
@ -788,6 +790,7 @@ static void CG_OffsetThirdPersonView( void )
{
cameraFocusAngles[YAW] = cg.predicted_player_state.stats[STAT_DEAD_YAW];
}
*/
}
else
{ // Add in the third Person Angle.

View file

@ -718,7 +718,8 @@ static void CG_OffsetThirdPersonView( void )
// if dead, look at killer
if ( cg.predicted_player_state.stats[STAT_HEALTH] <= 0 )
{
if ( MatrixMode )
//Do nothing
/* if ( MatrixMode )
{
if ( cg.overrides.active & CG_OVERRIDE_3RD_PERSON_ANG )
{
@ -733,7 +734,7 @@ static void CG_OffsetThirdPersonView( void )
else
{
cameraFocusAngles[YAW] = cg.predicted_player_state.stats[STAT_DEAD_YAW];
}
}*/
}
else
{ // Add in the third Person Angle.