From b05b3b261ecf5be9ce3697172cc1981d65f4fe55 Mon Sep 17 00:00:00 2001 From: Aaron M Date: Mon, 28 Oct 2019 19:29:07 +1300 Subject: [PATCH] Updated GRID to only do gear while speedo is above 0 --- Game Files/GRID.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Game Files/GRID.cpp b/Game Files/GRID.cpp index f808d74..792f057 100644 --- a/Game Files/GRID.cpp +++ b/Game Files/GRID.cpp @@ -46,6 +46,11 @@ void GRID::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* UINT8 PanelBase4 = helpers->ReadByte(PanelBase3 + 0x2C, false); UINT8 Wheels = helpers->ReadByte(PanelBase3 + 0xB4, false); UINT8 gear = helpers->ReadByte(0x346A5C6C, false); + INT_PTR speedoBase = helpers->ReadIntPtr(0x28C008, true); + INT_PTR speedoBase1 = helpers->ReadIntPtr(speedoBase + 0xD0, false); + INT_PTR speedoBase2 = helpers->ReadIntPtr(speedoBase1 + 0x460, false); + INT_PTR speedoBase3 = helpers->ReadIntPtr(speedoBase2 + 0x184, false); + float speedo = helpers->ReadFloat32(speedoBase3 + 0x4F4, false); UINT8 static oldgear = 0; UINT8 newgear = gear; @@ -54,7 +59,7 @@ void GRID::FFBLoop(EffectConstants* constants, Helpers* helpers, EffectTriggers* triggers->Springi(SpringStrength / 100.0); } - if (oldgear != newgear) + if ((oldgear != newgear) && (speedo > 0)) { SDL_Thread* gearChangeThread = SDL_CreateThread(GearChangeThread, "GearChangeThread", (void*)NULL); }