1
0
mirror of synced 2025-01-20 08:02:45 +01:00

Fix stupid spring effect etc on dead heat/wmmt3

This commit is contained in:
Boomslangnz 2022-06-08 19:34:14 +12:00
parent d5cdfed8ae
commit c364a25ec6
2 changed files with 6 additions and 40 deletions

View File

@ -40,13 +40,9 @@ void DeadHeat::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTrigg
if (EnableForceSpringEffect)
triggers->Springi(ForceSpringStrength / 100.0);
if (setSpring != OldsetSpring)
if (setSpring != OldsetSpring && setSpring)
{
double percentForce = setSpring / 63.0;
if (!setSpring)
percentForce = 0;
triggers->Spring(percentForce);
}
@ -56,14 +52,8 @@ void DeadHeat::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTrigg
triggers->Friction(percentForce);
}
if (setReflect != OldsetReflect)
if (setReflect != OldsetReflect && setReflect)
{
//if (setReflect == 0x00)
//{
// triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
//}
//else
if (setReflect > 0x00 && setReflect <= 0x3F)
{
double percentForce = setReflect / 63.0;
@ -80,15 +70,8 @@ void DeadHeat::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTrigg
}
}
if (setCenterOffset != OldsetCenterOffset)
if (setCenterOffset != OldsetCenterOffset && setCenterOffset)
{
//if (setCenterOffset == 0x00)
//{
// triggers->Rumble(0, 0, 0);
// triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
//}
//else
if (setCenterOffset > 0x00 && setCenterOffset <= 0x3F)
{
double percentForce = setCenterOffset / 63.0;

View File

@ -42,13 +42,9 @@ void WMMT3::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
if (EnableForceSpringEffect)
triggers->Springi(ForceSpringStrength / 100.0);
if (setSpring != OldsetSpring)
if (setSpring != OldsetSpring && setSpring)
{
double percentForce = setSpring / 63.0;
if (!setSpring)
percentForce = 0;
triggers->Spring(percentForce);
}
@ -58,14 +54,8 @@ void WMMT3::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
triggers->Friction(percentForce);
}
if (setReflect != OldsetReflect)
if (setReflect != OldsetReflect && setReflect)
{
//if (setReflect == 0x00)
//{
// triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
//}
//else
if (setReflect > 0x00 && setReflect <= 0x3F)
{
double percentForce = setReflect / 63.0;
@ -82,15 +72,8 @@ void WMMT3::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers
}
}
if (setCenterOffset != OldsetCenterOffset)
if (setCenterOffset != OldsetCenterOffset && setCenterOffset)
{
//if (setCenterOffset == 0x00)
//{
// triggers->Rumble(0, 0, 0);
// triggers->Constant(constants->DIRECTION_FROM_LEFT, 0);
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
//}
//else
if (setCenterOffset > 0x00 && setCenterOffset <= 0x3F)
{
double percentForce = setCenterOffset / 63.0;