GCSDK::CJob::UnsetLock
0x0005fa20 · 317 bytes · __thiscall
_ZN5GCSDK4CJob9UnsetLockEPNS_5CLockE
Decompiled
undefined (2 params)
/* WARNING: Removing unreachable block (ram,0x0005fae0) */
/* GCSDK::CJob::UnsetLock(GCSDK::CLock*) */
void __thiscall GCSDK::CJob::UnsetLock(CJob *this,CLock *param_1)
{
byte *pbVar1;
undefined4 uVar2;
undefined4 uVar3;
longlong lVar4;
CJobTime *this_00;
CJobTime *this_01;
longlong local_2c;
this_01 = (CJobTime *)(param_1 + 8);
*(undefined4 *)param_1 = 0;
this_00 = this_01;
lVar4 = CJobTime::CServerMicroSecsPassed(this_01);
if (9999999 < lVar4) {
this[0x18] = (CJob)((byte)this[0x18] | 4);
if (*(int *)(this + 0x5c) == 0) {
local_2c = CJobTime::CServerMicroSecsPassed(this_01);
if (*(undefined4 **)(this + 0x68) == (undefined4 *)0x0) {
uVar2 = GetName((CJob *)this_01);
}
else {
uVar2 = **(undefined4 **)(this + 0x68);
}
EmitWarning("job",4,"Job of type %s held lock for %.2f seconds\n",uVar2,
(double)local_2c * 1e-06);
}
else {
pbVar1 = (byte *)(*(int *)(this + 0x5c) + 0x18);
*pbVar1 = *pbVar1 | 8;
if (*(undefined4 **)(*(int *)(this + 0x5c) + 0x68) == (undefined4 *)0x0) {
uVar2 = GetName((CJob *)this_00);
}
else {
uVar2 = **(undefined4 **)(*(int *)(this + 0x5c) + 0x68);
}
local_2c = CJobTime::CServerMicroSecsPassed(this_01);
if (*(undefined4 **)(this + 0x68) == (undefined4 *)0x0) {
uVar3 = GetName((CJob *)this_01);
}
else {
uVar3 = **(undefined4 **)(this + 0x68);
}
EmitWarning("job",4,
"Job of type %s held lock for %.2f seconds while job of type %s was waiting\n",
uVar3,(double)local_2c * 1e-06,uVar2);
}
}
*(undefined4 *)(this + 0x54) = 0;
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.