mirror of
https://github.com/DrBeef/Doom3Quest.git
synced 2024-11-26 22:02:30 +00:00
Remove external haptics menu option
if external service is present, then it will be used, no need for a toggle
This commit is contained in:
parent
4295cd3c16
commit
812e38969d
7 changed files with 4 additions and 23 deletions
|
@ -2287,9 +2287,7 @@ void idCommonLocal::Vibrate(int channel, float low, float high)
|
|||
|
||||
void idCommonLocal::HapticEvent(const char* event, int position, int flags, int intensity, float angle, float yHeight )
|
||||
{
|
||||
if (cvarSystem->GetCVarBool("vr_useHapticsService")) {
|
||||
Doom3Quest_HapticEvent(event, position, flags, intensity, angle, yHeight);
|
||||
}
|
||||
Doom3Quest_HapticEvent(event, position, flags, intensity, angle, yHeight);
|
||||
}
|
||||
|
||||
void idCommonLocal::HapticStopEvent(const char* event)
|
||||
|
|
|
@ -814,18 +814,10 @@ void idGameLocal::SetVRClientInfo(vrClientInfo *pVR)
|
|||
{
|
||||
pVRClientInfo = pVR;
|
||||
|
||||
//Only triggers haptic enabling if value of cvar changes or the first time this is called
|
||||
static bool firstTime = true;
|
||||
static bool lastUseHapticsService = false;
|
||||
if (firstTime || (lastUseHapticsService != vr_useHapticsService.GetBool())) {
|
||||
if (vr_useHapticsService.GetBool()) {
|
||||
common->HapticEnable();
|
||||
} else {
|
||||
common->HapticDisable();
|
||||
}
|
||||
|
||||
if (firstTime) {
|
||||
common->HapticEnable();
|
||||
firstTime = false;
|
||||
lastUseHapticsService = vr_useHapticsService.GetBool();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12631,9 +12631,7 @@ void idPlayer::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &di
|
|||
}
|
||||
}
|
||||
|
||||
if ( IsType( idPlayer::Type ) &&
|
||||
//Save the effort of going through this code if vr_useHapticsService isn't enabled
|
||||
vr_useHapticsService.GetBool()) {
|
||||
if ( IsType( idPlayer::Type )) {
|
||||
idVec3 bodyOrigin = vec3_zero;
|
||||
idMat3 bodyAxis;
|
||||
GetViewPos( bodyOrigin, bodyAxis );
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
|
||||
idCVar vr_d3qversion( "vr_d3qversion", ENGINE_VERSION, CVAR_ROM | CVAR_GUI, "Version" );
|
||||
|
||||
// *** Haptics Service ***
|
||||
idCVar vr_useHapticsService( "vr_useHapticsService", "0", CVAR_BOOL | CVAR_ARCHIVE | CVAR_GAME, "Whether full-body haptics are enabled via the external haptics service" );
|
||||
|
||||
|
||||
// *** Oculus HMD Variables
|
||||
idCVar vr_scale( "vr_scale", "1.0", CVAR_FLOAT | CVAR_ARCHIVE | CVAR_GAME, "World scale. Everything virtual is this times as big." );
|
||||
//In Menu - added virtual function - needs testing
|
||||
|
|
|
@ -415,8 +415,6 @@ private:
|
|||
|
||||
};
|
||||
|
||||
extern idCVar vr_useHapticsService;
|
||||
|
||||
extern idCVar vr_scale;
|
||||
extern idCVar vr_normalViewHeight;
|
||||
extern idCVar vr_useFloorHeight;
|
||||
|
|
|
@ -841,7 +841,6 @@ int idSoundEmitterLocal::StartSound( const idSoundShader *shader, const s_channe
|
|||
chan->stopped = false;
|
||||
chan->Start();
|
||||
|
||||
if (cvarSystem->GetCVarBool("vr_useHapticsService"))
|
||||
{
|
||||
idVec3 direction = (soundWorld->listenerPos / DOOM_TO_METERS) - origin;
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue