Skip to content

Commit ef792d6

Browse files
authored
Remove vehicle framerate fixes again (#2787)
1 parent 7c8a1ab commit ef792d6

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

Client/multiplayer_sa/CMultiplayerSA_FrameRateFixes.cpp

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -162,44 +162,6 @@ static void _declspec(naked) HOOK_CFallingGlassPane__Update_C()
162162
}
163163
}
164164

165-
#define HOOKPOS_CPhysical__ApplyAirResistance 0x544D29
166-
#define HOOKSIZE_CPhysical__ApplyAirResistance 5
167-
static const unsigned int RETURN_CPhysical__ApplyAirResistance = 0x544D4D;
168-
static void _declspec(naked) HOOK_CPhysical__ApplyAirResistance()
169-
{
170-
_asm {
171-
fld ds:[0x862CD0] // 0.99000001f
172-
fld ds:[0xB7CB5C] // CTimer::ms_fTimeStep
173-
fdiv kOriginalTimeStep // 1.666f
174-
mov eax, 0x822130 // powf
175-
call eax
176-
177-
fld st(0)
178-
fmul [esi+0x50]
179-
fstp [esi+0x50]
180-
181-
fld st(0)
182-
fmul [esi+0x54]
183-
fstp [esi+0x54]
184-
185-
fmul [esi+0x58]
186-
fstp [esi+0x58]
187-
jmp RETURN_CPhysical__ApplyAirResistance
188-
}
189-
}
190-
191-
template <unsigned int returnAddress>
192-
static void _declspec(naked) HOOK_VehicleRapidStopFix()
193-
{
194-
static unsigned int RETURN_VehicleRapidStopFix = returnAddress;
195-
_asm {
196-
fld ds:[0xC2B9CC] // mod_HandlingManager.m_fWheelFriction
197-
fmul ds:[0xB7CB5C] // CTimer::ms_fTimeStep
198-
fdiv kOriginalTimeStep // 1.666f
199-
jmp RETURN_VehicleRapidStopFix
200-
}
201-
}
202-
203165
#define HOOKPOS_CTimer__Update 0x561C5D
204166
#define HOOKSIZE_CTimer__Update 0xE
205167
static void _declspec(naked) HOOK_CTimer__Update()
@@ -600,17 +562,7 @@ void CMultiplayerSA::InitHooks_FrameRateFixes()
600562
EZHookInstall(CFallingGlassPane__Update_A);
601563
EZHookInstall(CFallingGlassPane__Update_B);
602564
EZHookInstall(CFallingGlassPane__Update_C);
603-
EZHookInstall(CPhysical__ApplyAirResistance);
604-
605-
// CVehicle::ProcessWheel
606-
HookInstall(0x6D6E69, (DWORD)HOOK_VehicleRapidStopFix<0x6D6E6F>, 6);
607-
HookInstall(0x6D6EA8, (DWORD)HOOK_VehicleRapidStopFix<0x6D6EAE>, 6);
608-
609-
// CVehicle::ProcessBikeWheel
610-
HookInstall(0x6D767F, (DWORD)HOOK_VehicleRapidStopFix<0x6D7685>, 6);
611-
HookInstall(0x6D76AB, (DWORD)HOOK_VehicleRapidStopFix<0x6D76B1>, 6);
612-
HookInstall(0x6D76CD, (DWORD)HOOK_VehicleRapidStopFix<0x6D76D3>, 6);
613-
565+
614566
// CCam::Process_FollowCar_SA
615567
MemSet((void*)0x524FD7, 0x90, 0x1B);
616568

0 commit comments

Comments
 (0)