Merge pull request #13 from DrBeef/bhaptics

Extra haptic for arms
This commit is contained in:
Grant Bagwell 2021-12-22 12:59:56 +01:00 committed by GitHub
commit 8e08eb4850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -919,6 +919,9 @@ void RTCWVR_Haptic( int duration, int channel, float intensity, char *descriptio
else if(strcmp(description,"door_kick") == 0) {
RTCWVR_HapticEvent("kick_door", 0, 0, 100.0f * intensity, yaw, height);
}
else if(strcmp(description,"weapon_reload") == 0) {
RTCWVR_HapticEvent("weapon_reload", channel == 1 ? 2 : 1, 0, 100.0f * intensity, 0, 0);
}
else if(strcmp(description,"door_open") == 0) {
RTCWVR_HapticEvent("open_door", 0, 0, 100.0f * intensity, yaw, height);
}

View file

@ -1957,6 +1957,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
// can re-work if this causes trouble
// trap_S_StartSound (NULL, es->number, CHAN_AUTO, cg_weapons[es->weapon].reloadSound );
trap_S_StartSound( NULL, es->number, CHAN_WEAPON, cg_weapons[es->weapon].reloadSound );
trap_Haptic(1, cgVR->right_handed ? 1 : 0, 1.0f, "weapon_reload", 0.0f, 0.0f);
}
break;