Rename 's_bDedicated' to 's_bIsDedicated'

's_bIsDedicated' is the original name (see TRACEINIT in game executable).
This commit is contained in:
Kawe Mazidjatari 2023-01-31 22:30:45 +01:00
parent 419bf12e06
commit 6e32464519
3 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@
//-------------------------------------------------------------------------
void Dedicated_Init()
{
*s_bDedicated = true;
*s_bIsDedicated = true;
// //-------------------------------------------------------------------------
// // CGAME
// //-------------------------------------------------------------------------

View File

@ -17,7 +17,7 @@ inline auto SV_CreateBaseline = p_SV_CreateBaseline.RCast<bool(*)(void)>();
inline CMemory p_CGameServer__SpawnServer;
inline auto CGameServer__SpawnServer = p_CGameServer__SpawnServer.RCast<bool(*)(void* thisptr, const char* pszMapName, const char* pszMapGroupName)>();
inline bool* s_bDedicated = nullptr;
inline bool* s_bIsDedicated = nullptr;
///////////////////////////////////////////////////////////////////////////////
@ -33,7 +33,7 @@ class HSV_Main : public IDetour
LogFunAdr("SV_InitGameDLL", p_SV_InitGameDLL.GetPtr());
LogFunAdr("SV_ShutdownGameDLL", p_SV_ShutdownGameDLL.GetPtr());
LogFunAdr("SV_CreateBaseline", p_SV_CreateBaseline.GetPtr());
LogVarAdr("s_bDedicated", reinterpret_cast<uintptr_t>(s_bDedicated));
LogVarAdr("s_bIsDedicated", reinterpret_cast<uintptr_t>(s_bIsDedicated));
}
virtual void GetFun(void) const
{
@ -53,7 +53,7 @@ class HSV_Main : public IDetour
}
virtual void GetVar(void) const
{
s_bDedicated = g_GameDll.FindPatternSIMD("48 89 4C 24 ?? 48 89 54 24 ?? 4C 89 44 24 ?? 4C 89 4C 24 ?? 53 57 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 2B E0 48 8B D9 48 8D BC 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 89 7C 24 ?? 48 8D 54 24 ?? 33 FF")
s_bIsDedicated = g_GameDll.FindPatternSIMD("48 89 4C 24 ?? 48 89 54 24 ?? 4C 89 44 24 ?? 4C 89 4C 24 ?? 53 57 B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 2B E0 48 8B D9 48 8D BC 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 89 7C 24 ?? 48 8D 54 24 ?? 33 FF")
.FindPatternSelf("40 38 3D", CMemory::Direction::DOWN).ResolveRelativeAddressSelf(0x3, 0x7).RCast<bool*>();
}
virtual void GetCon(void) const { }

View File

@ -198,7 +198,7 @@ namespace VSquirrel
//-----------------------------------------------------------------------------
SQRESULT IsDedicated(HSQUIRRELVM v)
{
sq_pushbool(v, *s_bDedicated);
sq_pushbool(v, *s_bIsDedicated);
return SQ_OK;
}
}