mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 23:08:03 +03:00
Fix retrieval of sv address not working under linux
This commit is contained in:
parent
2eeeb2997d
commit
b3e5e10473
@ -524,16 +524,22 @@ void InitGlobalVars()
|
||||
uintptr_t base = *reinterpret_cast<uintptr_t*>(reinterpret_cast<byte*>(g_engfuncs.pfnGetCurrentPlayer) + typeDesc.fieldOffset);
|
||||
ServerStatic = reinterpret_cast<server_static_t*>(base - 4);
|
||||
}
|
||||
|
||||
if (CommonConfig->GetAddress("sv", &address))
|
||||
{
|
||||
Server = *reinterpret_cast<server_t**>(address);
|
||||
}
|
||||
#else
|
||||
if (CommonConfig->GetMemSig("svs", &address))
|
||||
{
|
||||
ServerStatic = reinterpret_cast<server_static_t*>(address);
|
||||
}
|
||||
#endif
|
||||
if (CommonConfig->GetAddress("sv", &address))
|
||||
|
||||
if (CommonConfig->GetMemSig("sv", &address))
|
||||
{
|
||||
Server = *reinterpret_cast<server_t**>(address);
|
||||
Server = reinterpret_cast<server_t*>(address);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ServerStatic)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user