diff --git a/Game Files/SonicSegaAllStarsRacing.cpp b/Game Files/SonicSegaAllStarsRacing.cpp index 1e92240..21eb9e0 100644 --- a/Game Files/SonicSegaAllStarsRacing.cpp +++ b/Game Files/SonicSegaAllStarsRacing.cpp @@ -15,28 +15,23 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>. #include "SonicSegaAllStarsRacing.h" void SonicSegaAllStarsRacing::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) { - INT_PTR FFBEnable = helpers->ReadByte(0x5CD858, /* isRelativeOffset*/ true); - INT_PTR FFB = helpers->ReadByte(0x5CD864, /* isRelativeOffset*/ true); + UINT8 FFBEnable = helpers->ReadByte(0x5CD858, /* isRelativeOffset*/ true); + UINT8 FFB = helpers->ReadByte(0x5CD864, /* isRelativeOffset*/ true); { //Enable FFB helpers->WriteByte(0x5CD858, 0x03, true); } - { - //Trigger friction to stop any oscillation - double percentForce = 0.2; - triggers->Friction(percentForce); - } - if ((FFB > 0) & (FFB < 19)) + + if ((FFB > 0) && (FFB < 19)) { helpers->log("moving wheel right"); double percentForce = (FFB) / 18.0; double percentLength = 100; triggers->Rumble(0, percentForce, percentLength); triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); - } - else if ((FFB > 237) & (FFB < 256)) + else if ((FFB > 237) && (FFB < 256)) { helpers->log("moving wheel right"); double percentForce = (256 - FFB) / 18.0;