diff --git a/r5dev/engine/host_cmd.h b/r5dev/engine/host_cmd.h index 4a9a626b..824c1082 100644 --- a/r5dev/engine/host_cmd.h +++ b/r5dev/engine/host_cmd.h @@ -19,13 +19,13 @@ extern EngineParms_t* g_pEngineParms; /* ==== HOST ============================================================================================================================================================ */ inline CMemory p_Host_Init; -inline auto Host_Init = p_Host_Init.RCast(); +inline auto v_Host_Init = p_Host_Init.RCast(); inline CMemory p_Host_NewGame; -inline auto Host_NewGame = p_Host_NewGame.RCast(); +inline auto v_Host_NewGame = p_Host_NewGame.RCast(); inline CMemory p_Host_ChangeLevel; -inline auto Host_ChangeLevel = p_Host_ChangeLevel.RCast(); +inline auto v_Host_ChangeLevel = p_Host_ChangeLevel.RCast(); inline CMemory p_Host_Status_PrintClient; inline auto v_Host_Status_PrintClient = p_Host_Status_PrintClient.RCast(); @@ -73,9 +73,9 @@ class VHostCmd : public IDetour p_DFS_InitializeFeatureFlagDefinitions = g_GameDll.FindPatternSIMD("48 8B C4 55 53 48 8D 68 E8"); v_DFS_InitializeFeatureFlagDefinitions = p_DFS_InitializeFeatureFlagDefinitions.RCast(); /*48 8B C4 55 53 48 8D 68 E8*/ #endif // !(GAMEDLL_S0) || !(GAMEDLL_S1) || !(GAMEDLL_S2) - Host_Init = p_Host_Init.RCast(); /*48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 55 41 54 41 55 41 56 41 57 48 8D AC 24 ?? ?? ?? ?? B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 2B E0 48 8B D9*/ - Host_NewGame = p_Host_NewGame.RCast(); /*48 8B C4 ?? 41 54 41 55 48 81 EC 70 04 00 00 F2 0F 10 05 ?? ?? ?? 0B*/ - Host_ChangeLevel = p_Host_ChangeLevel.RCast(); /*40 56 57 41 56 48 81 EC ?? ?? ?? ??*/ + v_Host_Init = p_Host_Init.RCast(); /*48 89 5C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 55 41 54 41 55 41 56 41 57 48 8D AC 24 ?? ?? ?? ?? B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 2B E0 48 8B D9*/ + v_Host_NewGame = p_Host_NewGame.RCast(); /*48 8B C4 ?? 41 54 41 55 48 81 EC 70 04 00 00 F2 0F 10 05 ?? ?? ?? 0B*/ + v_Host_ChangeLevel = p_Host_ChangeLevel.RCast(); /*40 56 57 41 56 48 81 EC ?? ?? ?? ??*/ v_Host_Status_PrintClient = p_Host_Status_PrintClient.RCast(); v_SetLaunchOptions = p_SetLaunchOptions.RCast(); /*48 89 5C 24 ?? 48 89 6C 24 ?? 57 48 83 EC 20 48 8B 1D ?? ?? ?? ?? 48 8B E9 48 85 DB*/ } diff --git a/r5dev/engine/host_state.cpp b/r5dev/engine/host_state.cpp index 07d514d0..79a8de26 100644 --- a/r5dev/engine/host_state.cpp +++ b/r5dev/engine/host_state.cpp @@ -377,7 +377,7 @@ void CHostState::State_NewGame(void) #ifndef CLIENT_DLL if (!CModelLoader__Map_IsValid(g_pModelLoader, m_levelName) // Check if map is valid and if we can start a new game. - || !Host_NewGame(m_levelName, nullptr, m_bBackgroundLevel, bSplitScreenConnect, time) || !g_pServerGameClients) + || !v_Host_NewGame(m_levelName, nullptr, m_bBackgroundLevel, bSplitScreenConnect, time) || !g_pServerGameClients) { Error(eDLL_T::ENGINE, NO_ERROR, "%s: Error: Level not valid\n", __FUNCTION__); #ifndef DEDICATED @@ -406,7 +406,7 @@ void CHostState::State_ChangeLevelSP(void) if (CModelLoader__Map_IsValid(g_pModelLoader, m_levelName)) // Check if map is valid and if we can start a new game. { - Host_ChangeLevel(true, m_levelName, m_mapGroupName); // Call change level as singleplayer level. + v_Host_ChangeLevel(true, m_levelName, m_mapGroupName); // Call change level as singleplayer level. } else { @@ -438,7 +438,7 @@ void CHostState::State_ChangeLevelMP(void) #ifndef DEDICATED g_pEngineVGui->EnabledProgressBarForNextLoad(); #endif // !DEDICATED - Host_ChangeLevel(false, m_levelName, m_mapGroupName); // Call change level as multiplayer level. + v_Host_ChangeLevel(false, m_levelName, m_mapGroupName); // Call change level as multiplayer level. } else { diff --git a/r5dev/tier1/bitbuf.cpp b/r5dev/tier1/bitbuf.cpp index 4ad11297..0cb5b97b 100644 --- a/r5dev/tier1/bitbuf.cpp +++ b/r5dev/tier1/bitbuf.cpp @@ -14,10 +14,10 @@ //----------------------------------------------------------------------------- // Write masks //----------------------------------------------------------------------------- -class CBitWriteMasksInit +class CBitWriteMasks { public: - CBitWriteMasksInit() + CBitWriteMasks() { for (unsigned int startbit = 0; startbit < 32; startbit++) { @@ -41,11 +41,10 @@ public: // Precalculated bit masks for WriteUBitLong. Using these tables instead of // doing the calculations gives a 33% speedup in WriteUBitLong. unsigned long m_BitWriteMasks[32][33]; - - unsigned long m_ExtraMasks[33]; // (1 << i) - 1 unsigned long m_LittleBits[32]; + unsigned long m_ExtraMasks[33]; // (1 << i) - 1 }; -static CBitWriteMasksInit s_BitWriteMasks; +static CBitWriteMasks s_BitWriteMasks; //-----------------------------------------------------------------------------