Cruisn Blast improvements
This commit is contained in:
parent
2aa65fe9ee
commit
ca0bf28b42
@ -22,6 +22,7 @@ extern int EnableDamper;
|
|||||||
extern int DamperStrength;
|
extern int DamperStrength;
|
||||||
|
|
||||||
static float lastFF = 0;
|
static float lastFF = 0;
|
||||||
|
static int currentScreen = 0;
|
||||||
|
|
||||||
static int(__cdecl* Wheel_SetHookOrig)(float param_1);
|
static int(__cdecl* Wheel_SetHookOrig)(float param_1);
|
||||||
static int __cdecl Wheel_SetHook(float param_1)
|
static int __cdecl Wheel_SetHook(float param_1)
|
||||||
@ -35,17 +36,33 @@ static int __cdecl Wheel_SetHook(float param_1)
|
|||||||
int puVar7 = myHelpers->ReadInt32(0x8babbc0, false); //0 menus, 1 game
|
int puVar7 = myHelpers->ReadInt32(0x8babbc0, false); //0 menus, 1 game
|
||||||
|
|
||||||
if (puVar7 == 1)
|
if (puVar7 == 1)
|
||||||
|
{
|
||||||
|
if (currentScreen == 0)
|
||||||
{
|
{
|
||||||
//in game - turn on wheel effects
|
//in game - turn on wheel effects
|
||||||
myHelpers->WriteByte(0x9c28504, 1, false);
|
myHelpers->WriteByte(0x9c28504, 1, false);
|
||||||
lastFF = param_1;
|
currentScreen = 1;
|
||||||
|
lastFF = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
lastFF = param_1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (currentScreen == 1)
|
||||||
{
|
{
|
||||||
//not in game turn off wheel effects
|
//not in game turn off wheel effects
|
||||||
myHelpers->WriteByte(0x9c28504, 0, false);
|
myHelpers->WriteByte(0x9c28504, 0, false);
|
||||||
|
lastFF = 0;
|
||||||
|
currentScreen = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
lastFF = puVar1;
|
lastFF = puVar1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (lastFF >= 0) {
|
if (lastFF >= 0) {
|
||||||
myTriggers->Rumble(0, lastFF, 100.0);
|
myTriggers->Rumble(0, lastFF, 100.0);
|
||||||
myTriggers->Constant(myConstants->DIRECTION_FROM_RIGHT, lastFF);
|
myTriggers->Constant(myConstants->DIRECTION_FROM_RIGHT, lastFF);
|
||||||
@ -58,7 +75,6 @@ static int __cdecl Wheel_SetHook(float param_1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CruisnBlast::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
|
void CruisnBlast::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers) {
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user