Storm/Interpolate.hpp

28 lines
679 B
C++
Raw Normal View History

2024-10-07 03:45:39 +08:00
struct Global_Variables_Structure
{
__int8 Additional_Bytes_1[12];
float Current_Time;
float Frame_Time;
__int8 Additional_Bytes_2[8];
float Interval_Per_Tick;
};
2024-04-04 03:17:09 +08:00
void* Original_Interpolate_Caller;
2024-10-07 03:45:39 +08:00
__int8 __thiscall Redirected_Interpolate(void* Entity, float Time)
2024-04-04 03:17:09 +08:00
{
2024-10-07 03:45:39 +08:00
if (Entity == *(void**)((unsigned __int32)Client_Module + 7498712))
2024-04-04 03:17:09 +08:00
{
2024-10-07 03:45:39 +08:00
Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time;
*(__int32*)((unsigned __int32)Entity + 5328) -= *(__int32*)((unsigned __int32)Entity + 16);
return (decltype(&Redirected_Interpolate)(Original_Interpolate_Caller))(Entity, Time);
2024-04-04 03:17:09 +08:00
}
return 1;
}