mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-15 08:40:40 +00:00
Couple of fixes
- Use unadjusted angles for off-hand controller movement direction - Ensure that the lightning gun in the demo shows the correct lightning shader
This commit is contained in:
parent
e00ae24aff
commit
7e697c91d3
3 changed files with 12 additions and 3 deletions
|
@ -1005,7 +1005,14 @@ void CG_RegisterWeapon( int weaponNum ) {
|
|||
weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/lightning/lg_hum.wav", qfalse );
|
||||
|
||||
weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/lightning/lg_fire.wav", qfalse );
|
||||
cgs.media.lightningShader = trap_R_RegisterShader( "lightningBoltNew");
|
||||
if (trap_Cvar_VariableValue("demoversion") != 0.0f)
|
||||
{
|
||||
cgs.media.lightningShader = trap_R_RegisterShader("lightningBolt");
|
||||
}
|
||||
else
|
||||
{
|
||||
cgs.media.lightningShader = trap_R_RegisterShader("lightningBoltNew");
|
||||
}
|
||||
cgs.media.lightningExplosionModel = trap_R_RegisterModel( "models/weaphits/crackle.md3" );
|
||||
cgs.media.sfx_lghit1 = trap_S_RegisterSound( "sound/weapons/lightning/lg_hit.wav", qfalse );
|
||||
cgs.media.sfx_lghit2 = trap_S_RegisterSound( "sound/weapons/lightning/lg_hit2.wav", qfalse );
|
||||
|
|
|
@ -50,6 +50,7 @@ typedef struct {
|
|||
vec3_t weaponposition;
|
||||
|
||||
vec3_t offhandangles;
|
||||
vec3_t offhandangles2;
|
||||
vec3_t offhandoffset;
|
||||
vec3_t offhandoffset_last[2];
|
||||
vec3_t offhandposition;
|
||||
|
|
|
@ -457,6 +457,7 @@ static void IN_VRController( qboolean isRightController, ovrTracking remoteTrack
|
|||
}
|
||||
} else {
|
||||
vec3_t rotation = {0};
|
||||
QuatToYawPitchRoll(remoteTracking.HeadPose.Pose.Orientation, rotation, vr.offhandangles2); // used for off-hand direction mode
|
||||
rotation[PITCH] = vr_weaponPitch->value;
|
||||
QuatToYawPitchRoll(remoteTracking.HeadPose.Pose.Orientation, rotation, vr.offhandangles);
|
||||
|
||||
|
@ -529,7 +530,7 @@ static void IN_VRJoystick( qboolean isRightController, float joystickX, float jo
|
|||
rotateAboutOrigin(joystickX, joystickY, vr.hmdorientation[YAW], joystick);
|
||||
} else {
|
||||
//Off-hand based
|
||||
rotateAboutOrigin(joystickX, joystickY, vr.offhandangles[YAW], joystick);
|
||||
rotateAboutOrigin(joystickX, joystickY, vr.offhandangles2[YAW], joystick);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -548,7 +549,7 @@ static void IN_VRJoystick( qboolean isRightController, float joystickX, float jo
|
|||
joystick[1] = joystickY;
|
||||
} else {
|
||||
//Off-hand based
|
||||
rotateAboutOrigin(joystickX, joystickY, vr.offhandangles[YAW] - vr.hmdorientation[YAW], joystick);
|
||||
rotateAboutOrigin(joystickX, joystickY, vr.offhandangles2[YAW] - vr.hmdorientation[YAW], joystick);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue