mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Don't trigger haptics when blade hits solid if saber is in flight
This commit is contained in:
parent
19be309f9a
commit
b4596caab9
2 changed files with 24 additions and 12 deletions
|
@ -6503,11 +6503,14 @@ Ghoul2 Insert End
|
|||
if ( (trace.contents&CONTENTS_WATER) || (trace.contents&CONTENTS_SLIME) )
|
||||
{
|
||||
if ( !noMarks )
|
||||
{
|
||||
if (saberNum == 1 || !cent->gent->client->ps.saberInFlight)
|
||||
{
|
||||
int position = (vr->right_handed ?
|
||||
((saberNum == 0) ? 2 : 1) :
|
||||
((saberNum == 0) ? 1 : 2));
|
||||
cgi_HapticEvent("chainsaw_fire", position, 0, 25, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
if ( !(cent->gent->client->ps.saberEventFlags&SEF_INWATER) )
|
||||
|
@ -6533,11 +6536,14 @@ Ghoul2 Insert End
|
|||
else
|
||||
{
|
||||
if ( !noMarks )
|
||||
{
|
||||
if (saberNum == 1 || !cent->gent->client->ps.saberInFlight)
|
||||
{
|
||||
int position = (vr->right_handed ?
|
||||
((saberNum == 0) ? 2 : 1) :
|
||||
((saberNum == 0) ? 1 : 2));
|
||||
cgi_HapticEvent("chainsaw_fire", position, 0, 25, 0, 0);
|
||||
}
|
||||
|
||||
if ( ( !WP_SaberBladeUseSecondBladeStyle( &client->ps.saber[saberNum], bladeNum ) && !(client->ps.saber[saberNum].saberFlags2&SFL2_NO_WALL_MARKS) )
|
||||
|| ( WP_SaberBladeUseSecondBladeStyle( &client->ps.saber[saberNum], bladeNum ) && !(client->ps.saber[saberNum].saberFlags2&SFL2_NO_WALL_MARKS2) ) )
|
||||
|
|
|
@ -4587,9 +4587,12 @@ Ghoul2 Insert End
|
|||
if ( trace.fraction < 1.0f )
|
||||
{
|
||||
if ( (trace.contents&CONTENTS_WATER) || (trace.contents&CONTENTS_SLIME) )
|
||||
{
|
||||
if (!cent->gent->client->ps.saberInFlight)
|
||||
{
|
||||
int position = (vr->right_handed ? 2 : 1);
|
||||
cgi_HapticEvent("chainsaw_fire", position, 0, 25, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
if ( !(cent->gent->client->ps.saberEventFlags&SEF_INWATER) )
|
||||
|
@ -4609,9 +4612,12 @@ Ghoul2 Insert End
|
|||
i = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!cent->gent->client->ps.saberInFlight)
|
||||
{
|
||||
int position = (vr->right_handed ? 2 : 1);
|
||||
cgi_HapticEvent("chainsaw_fire", position, 0, 25, 0, 0);
|
||||
}
|
||||
|
||||
theFxScheduler.PlayEffect( "spark", trace.endpos, trace.plane.normal );
|
||||
// All I need is a bool to mark whether I have a previous point to work with.
|
||||
|
|
Loading…
Reference in a new issue