remove friction from sonic racing
This commit is contained in:
parent
52d0068964
commit
40ebed5560
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user