CHLTVServer::LinkInstanceBaselines
0x00171710 · 258 bytes · __thiscall
_ZN11CHLTVServer21LinkInstanceBaselinesEv
Decompiled
undefined (1 param)
/* CHLTVServer::LinkInstanceBaselines() */
void __thiscall CHLTVServer::LinkInstanceBaselines(CHLTVServer *this)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
bool bVar5;
char local_40 [32];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar2 = ThreadGetCurrentId();
if (uVar2 != g_svInstanceBaselineMutex) {
LOCK();
bVar5 = g_svInstanceBaselineMutex != 0;
uVar1 = uVar2;
if (bVar5) {
uVar1 = g_svInstanceBaselineMutex;
}
g_svInstanceBaselineMutex = uVar1;
UNLOCK();
if (bVar5) {
CThreadFastMutex::Lock(0x350d48,uVar2);
goto LAB_00171754;
}
}
DAT_00350d4c = DAT_00350d4c + 1;
LAB_00171754:
/* try { // try from 0017175a to 001717a8 has its CatchHandler @ 0017180d */
CBaseServer::GetInstanceBaselineTable((CBaseServer *)(this + 4));
iVar3 = (**(code **)(*serverGameDLL + 0x28))(serverGameDLL);
for (; iVar3 != 0; iVar3 = *(int *)(iVar3 + 8)) {
V_snprintf(local_40,0x20,"%d",*(undefined4 *)(iVar3 + 0xc));
iVar4 = (**(code **)(**(int **)(this + 0xc4) + 0x34))(*(int **)(this + 0xc4),local_40);
if (iVar4 == -1) {
iVar4 = 0xffff;
}
*(int *)(iVar3 + 0x10) = iVar4;
}
DAT_00350d4c = DAT_00350d4c + -1;
if (DAT_00350d4c == 0) {
LOCK();
UNLOCK();
g_svInstanceBaselineMutex = 0;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.