CSpatialPartition::UnhideElement
0x001dc200 · 117 bytes · __cdecl
_ZN17CSpatialPartition13UnhideElementEti
Decompiled
undefined (2 params)
/* CSpatialPartition::UnhideElement(unsigned short, int) */
uint CSpatialPartition::UnhideElement(ushort param_1,int param_2)
{
uint *puVar1;
byte *pbVar2;
uint uVar3;
uint uVar4;
undefined2 in_stack_00000006;
uVar4 = ThreadGetCurrentId();
puVar1 = (uint *)(_param_1 + 0x34);
if (uVar4 != *(uint *)(_param_1 + 0x34)) {
LOCK();
uVar3 = *puVar1;
if (uVar3 == 0) {
*puVar1 = uVar4;
}
UNLOCK();
if (uVar3 != 0) {
CThreadFastMutex::Lock((uint)puVar1,uVar4);
goto LAB_001dc231;
}
}
*(int *)(_param_1 + 0x38) = *(int *)(_param_1 + 0x38) + 1;
LAB_001dc231:
pbVar2 = (byte *)((param_2 & 0xffffU) * 0x34 + *(int *)(_param_1 + 0x10) + 0x1e);
*pbVar2 = *pbVar2 & 0xfe;
*(int *)(_param_1 + 0x38) = *(int *)(_param_1 + 0x38) + -1;
uVar4 = *(uint *)(_param_1 + 0x38);
if (uVar4 == 0) {
LOCK();
uVar4 = *puVar1;
*puVar1 = 0;
UNLOCK();
}
return uVar4;
}
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.