mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Prevent haptics triggering when an NPC is using the force
This commit is contained in:
parent
72ba9972d8
commit
1597349f9d
2 changed files with 20 additions and 10 deletions
|
@ -9060,8 +9060,11 @@ void ForceThrow( gentity_t *self, qboolean pull, qboolean fake )
|
|||
}
|
||||
}
|
||||
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
if (self->client->ps.clientNum == 0)
|
||||
{
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART );
|
||||
|
@ -11186,9 +11189,11 @@ void ForceShootLightning( gentity_t *self )
|
|||
|
||||
VectorNormalize( forward );
|
||||
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
|
||||
if (self->client->ps.clientNum == 0)
|
||||
{
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
}
|
||||
|
||||
//FIXME: if lightning hits water, do water-only-flagged radius damage from that point
|
||||
if ( self->client->ps.forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_2 )
|
||||
|
|
|
@ -5719,9 +5719,11 @@ void ForceThrowEx( gentity_t *self, qboolean pull, qboolean aimByViewAngles )
|
|||
}
|
||||
}
|
||||
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
|
||||
if (self->client->ps.clientNum == 0)
|
||||
{
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
}
|
||||
|
||||
NPC_SetAnim( self, parts, anim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_RESTART );
|
||||
self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in
|
||||
|
@ -7333,8 +7335,11 @@ void ForceShootLightning( gentity_t *self )
|
|||
|
||||
VectorNormalize( forward );
|
||||
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
if (self->client->ps.clientNum == 0)
|
||||
{
|
||||
//Handle this here so it is refreshed on every frame, not just when the lightning gun is first fired
|
||||
cgi_HapticEvent("RTCWQuest:fire_tesla", 0, (vr->right_handed ? 2 : 1), 100, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
//FIXME: if lightning hits water, do water-only-flagged radius damage from that point
|
||||
|
|
Loading…
Reference in a new issue