Rename 'g_bDedicated' to 'm_bIsDedicated'

This commit is contained in:
Kawe Mazidjatari 2023-01-31 22:40:15 +01:00
parent 6e32464519
commit e50601ed29
3 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ public:
int GetClassBits(void) const { return m_nServerClassBits; }
bool IsActive(void) const { return m_State >= server_state_t::ss_active; }
bool IsLoading(void) const { return m_State == server_state_t::ss_loading; }
bool IsDedicated(void) const { return g_bDedicated; }
bool IsDedicated(void) const { return m_bIsDedicated; }
bool AuthClient(user_creds_s* pChallenge);
void RejectConnection(int iSocket, netadr_t* pNetAdr, const char* szMessage);
static CClient* ConnectClient(CServer* pServer, user_creds_s* pChallenge);

View File

@ -68,7 +68,7 @@ bool CModAppSystemGroup::Create(CModAppSystemGroup* pModAppSystemGroup)
ConCommand::Init();
#ifdef DEDICATED
pModAppSystemGroup->SetServerOnly();
*g_bDedicated = true;
*m_bIsDedicated = true;
#endif // DEDICATED
g_pFactory->GetFactoriesFromRegister();
g_pFactory->AddFactory(FACTORY_INTERFACE_VERSION, g_pFactory);

View File

@ -6,7 +6,7 @@
inline CMemory p_IVEngineServer__PersistenceAvailable;
inline auto IVEngineServer__PersistenceAvailable = p_IVEngineServer__PersistenceAvailable.RCast<bool (*)(void* entidx, int clientidx)>();
inline bool* g_bDedicated = nullptr;
inline bool* m_bIsDedicated = nullptr;
///////////////////////////////////////////////////////////////////////////////
@ -53,7 +53,7 @@ class HVEngineServer : public IDetour
{
LogConAdr("CVEngineServer::`vftable'", reinterpret_cast<uintptr_t>(g_pEngineServerVFTable));
LogFunAdr("CVEngineServer::PersistenceAvailable", p_IVEngineServer__PersistenceAvailable.GetPtr());
LogVarAdr("g_bDedicated", reinterpret_cast<uintptr_t>(g_bDedicated));
LogVarAdr("m_bIsDedicated", reinterpret_cast<uintptr_t>(m_bIsDedicated)); // !TODO: part of CServer!
}
virtual void GetFun(void) const
{
@ -65,7 +65,7 @@ class HVEngineServer : public IDetour
CMemory pEngineServerVFTable = g_GameDll.GetVirtualMethodTable(".?AVCVEngineServer@@", 0);
g_pEngineServerVFTable = pEngineServerVFTable.RCast<CVEngineServer*>();
g_bDedicated = pEngineServerVFTable.WalkVTableSelf(3).DerefSelf().ResolveRelativeAddress(0x3, 0x7).RCast<bool*>();
m_bIsDedicated = pEngineServerVFTable.WalkVTableSelf(3).DerefSelf().ResolveRelativeAddress(0x3, 0x7).RCast<bool*>();
}
virtual void GetCon(void) const { }
virtual void Attach(void) const;