GCSDK::CJob::Pause
0x0005f690 · 128 bytes · __thiscall
_ZN5GCSDK4CJob5PauseENS_15EJobPauseReasonE
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* GCSDK::CJob::Pause(GCSDK::EJobPauseReason) */
void __thiscall GCSDK::CJob::Pause(CJob *this,undefined4 param_2)
{
CJob *pCVar1;
undefined8 uVar2;
uint uVar3;
uint uVar4;
int iVar5;
g_pJobCur = *(undefined4 *)(this + 0x50);
uVar2 = rdtsc();
uVar3 = (uint)uVar2 - *(uint *)(this + 0x40);
iVar5 = ((int)((ulonglong)uVar2 >> 0x20) - *(int *)(this + 0x44)) -
(uint)((uint)uVar2 < *(uint *)(this + 0x40));
*(uint *)(this + 0x40) = uVar3;
pCVar1 = this + 0x48;
uVar4 = *(uint *)pCVar1;
*(uint *)pCVar1 = *(uint *)pCVar1 + uVar3;
*(int *)(this + 0x44) = iVar5;
*(uint *)(this + 0x4c) = *(int *)(this + 0x4c) + iVar5 + (uint)CARRY4(uVar4,uVar3);
uVar4 = __udivdi3((int)((ulonglong)uVar3 * 1000000),
(int)((ulonglong)uVar3 * 1000000 >> 0x20) + iVar5 * 1000000,_g_ClockSpeed,
_RandomInt);
if (50000 < uVar4) {
this[0x18] = (CJob)((byte)this[0x18] | 0x20);
}
*(undefined4 *)(this + 0x24) = param_2;
Coroutine_YieldToMain();
return;
}
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.