Improve CHostState::FrameUpdate parameter types and names

This commit is contained in:
Kawe Mazidjatari 2022-07-17 12:16:31 +02:00
parent 746e7e9996
commit ab8d0b8f57
2 changed files with 7 additions and 7 deletions

View File

@ -50,7 +50,7 @@
//-----------------------------------------------------------------------------
// Purpose: state machine's main processing loop
//-----------------------------------------------------------------------------
FORCEINLINE void CHostState::FrameUpdate(CHostState* rcx, void* rdx, float time)
FORCEINLINE void CHostState::FrameUpdate(CHostState* pHostState, double flCurrentTime, float flFrameTime)
{
static bool bInitialized = false;
if (!bInitialized)
@ -100,7 +100,7 @@ FORCEINLINE void CHostState::FrameUpdate(CHostState* rcx, void* rdx, float time)
}
case HostStates_t::HS_RUN:
{
CHostState_State_Run(&g_pHostState->m_iCurrentState, nullptr, time);
CHostState_State_Run(&g_pHostState->m_iCurrentState, flCurrentTime, flFrameTime);
break;
}
case HostStates_t::HS_GAME_SHUTDOWN:

View File

@ -17,7 +17,7 @@ class CHostState
{
public:
FORCEINLINE static void FrameUpdate(CHostState* rcx, void* rdx, float time);
FORCEINLINE static void FrameUpdate(CHostState* pHostState, double flCurrentTime, float flFrameTime);
FORCEINLINE void LoadConfig(void) const;
FORCEINLINE void Init(void);
@ -52,10 +52,10 @@ public:
/* ==== CHOSTSTATE ====================================================================================================================================================== */
inline CMemory p_CHostState_FrameUpdate;
inline auto CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast<void(*)(CHostState* rcx, void* rdx, float time)>();
inline auto CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast<void(*)(CHostState* pHostState, double flCurrentTime, float flFrameTime)>();
inline CMemory p_CHostState_State_Run;
inline auto CHostState_State_Run = p_CHostState_State_Run.RCast<void(*)(HostStates_t* pState, void* pUnused, float flFrameTime)>();
inline auto CHostState_State_Run = p_CHostState_State_Run.RCast<void(*)(HostStates_t* pState, double flCurrentTime, float flFrameTime)>();
inline CMemory p_CHostState_State_GameShutDown;
inline auto CHostState_State_GameShutDown = p_CHostState_State_GameShutDown.RCast<void(*)(CHostState* thisptr)>();
@ -89,8 +89,8 @@ class VHostState : public IDetour
#elif defined (GAMEDLL_S3)
p_CHostState_State_GameShutDown = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x57\x48\x83\xEC\x20\x48\x8B\xD9\xE8\x00\x00\x00\x00\x48\x8B\x0D\x00\x00\x00\x00"), "xxxx?xxxxxxxxx????xxx????");
#endif
CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast<void(*)(CHostState*, void*, float)>(); /*48 89 5C 24 08 48 89 6C 24 20 F3 0F 11 54 24 18*/
CHostState_State_Run = p_CHostState_State_Run.RCast<void(*)(HostStates_t*, void*, float)>(); /*48 8B C4 48 89 58 10 48 89 70 18 48 89 78 20 55 41 54 41 55 41 56 41 57 48 8D A8 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 0F 29 70 C8 45 33 E4*/
CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast<void(*)(CHostState*, double, float)>(); /*48 89 5C 24 08 48 89 6C 24 20 F3 0F 11 54 24 18*/
CHostState_State_Run = p_CHostState_State_Run.RCast<void(*)(HostStates_t*, double, float)>(); /*48 8B C4 48 89 58 10 48 89 70 18 48 89 78 20 55 41 54 41 55 41 56 41 57 48 8D A8 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 0F 29 70 C8 45 33 E4*/
CHostState_State_GameShutDown = p_CHostState_State_GameShutDown.RCast<void(*)(CHostState* thisptr)>(); /*48 89 5C 24 ?? 57 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ??*/
}
virtual void GetVar(void) const