diff --git a/Projects/Android/jni/d3es-multithread-master/neo/game/Player.cpp b/Projects/Android/jni/d3es-multithread-master/neo/game/Player.cpp index 9e3735a..6a9345c 100644 --- a/Projects/Android/jni/d3es-multithread-master/neo/game/Player.cpp +++ b/Projects/Android/jni/d3es-multithread-master/neo/game/Player.cpp @@ -3553,6 +3553,9 @@ void idPlayer::NextBestWeapon( void ) { if ( !spawnArgs.GetBool( va( "weapon%d_best", w ) ) ) { continue; } + if (w == WEAPON_FLASHLIGHT) { + continue; + } break; } idealWeapon = w; @@ -3598,7 +3601,11 @@ void idPlayer::NextWeapon( void ) { if ( ( inventory.weapons & ( 1 << w ) ) == 0 ) { continue; } - if ( inventory.HasAmmo( weap ) ) { + if (w == WEAPON_FLASHLIGHT) { + // Don't let user cycle through flashlight, they have to get it from the holster + continue; + } + if ( inventory.HasAmmo( weap ) ) { break; } } @@ -3648,6 +3655,10 @@ void idPlayer::PrevWeapon( void ) { if ( ( inventory.weapons & ( 1 << w ) ) == 0 ) { continue; } + if (w == WEAPON_FLASHLIGHT) { + // Don't let user cycle through flashlight, they have to get it from the holster + continue; + } if ( inventory.HasAmmo( weap ) ) { break; } @@ -6334,15 +6345,17 @@ void idPlayer::Think( void ) { if (pVRClientInfo != nullptr) { - if (inventory.weapons > 1) { + if (inventory.weapons > WEAPON_FISTS) { pVRClientInfo->weaponid = currentWeapon; } else { pVRClientInfo->weaponid = -1; } cvarSystem->SetCVarBool("vr_weapon_stabilised", pVRClientInfo->weapon_stabilised); - pVRClientInfo->velocitytriggered = (currentWeapon == 11 || // 11 is flashlight - currentWeapon == 10); // 10 is chainsaw + pVRClientInfo->velocitytriggered = ( + currentWeapon == WEAPON_FISTS || + currentWeapon == WEAPON_FLASHLIGHT || + currentWeapon == WEAPON_CHAINSAW); } // clear the ik before we do anything else so the skeleton doesn't get updated twice @@ -7246,7 +7259,8 @@ void idPlayer::CalculateViewWeaponPos( bool adjusted, idVec3 &origin, idMat3 &ax const idVec3 &viewOrigin = firstPersonViewOrigin; const idMat3 &viewAxis = firstPersonViewAxis; - if (pVRClientInfo) + if (pVRClientInfo && + currentWeapon != weapon_pda) { if (adjusted) { angles.pitch = pVRClientInfo->weaponangles[PITCH]; @@ -7274,7 +7288,7 @@ void idPlayer::CalculateViewWeaponPos( bool adjusted, idVec3 &origin, idMat3 &ax gunpos *= cvarSystem->GetCVarFloat( "vr_worldscale" ); - if (currentWeapon == 11) // Flashlight adjustment + if (currentWeapon == WEAPON_FLASHLIGHT) // Flashlight adjustment { idVec3 gunOfs( -14, 9, 20 ); origin = viewOrigin + gunpos + (gunOfs * axis); diff --git a/Projects/Android/jni/d3es-multithread-master/neo/game/Player.h b/Projects/Android/jni/d3es-multithread-master/neo/game/Player.h index 18273fc..dd807de 100644 --- a/Projects/Android/jni/d3es-multithread-master/neo/game/Player.h +++ b/Projects/Android/jni/d3es-multithread-master/neo/game/Player.h @@ -66,6 +66,10 @@ const int FOCUS_GUI_TIME = 500; const int MAX_WEAPONS = 16; +const int WEAPON_FISTS = 1; +const int WEAPON_CHAINSAW = 10; +const int WEAPON_FLASHLIGHT = 11; + const int DEAD_HEARTRATE = 0; // fall to as you die const int LOWHEALTH_HEARTRATE_ADJ = 20; // const int DYING_HEARTRATE = 30; // used for volumen calc when dying/dead diff --git a/assets/pak099.pk4 b/assets/pak099.pk4 index 409391c..53cf2b7 100644 Binary files a/assets/pak099.pk4 and b/assets/pak099.pk4 differ