CSpatialPartition::DestroyHandle
0x001dec70 · 173 bytes · __regparm1
_ZN17CSpatialPartition13DestroyHandleEt
Decompiled
undefined (1 param)
/* CSpatialPartition::DestroyHandle(unsigned short) */
uint __regparm1 CSpatialPartition::DestroyHandle(ushort param_1)
{
uint *puVar1;
uint uVar2;
undefined2 in_register_00000002;
uint uVar3;
int *in_stack_00000004;
ushort in_stack_00000008;
if (in_stack_00000008 == 0xffff) {
return CONCAT22(in_register_00000002,param_1);
}
(**(code **)(*in_stack_00000004 + 0x94))();
puVar1 = (uint *)(in_stack_00000004 + 0xd);
uVar3 = ThreadGetCurrentId();
if (uVar3 != in_stack_00000004[0xd]) {
LOCK();
uVar2 = *puVar1;
if (uVar2 == 0) {
*puVar1 = uVar3;
}
UNLOCK();
if (uVar2 != 0) {
CThreadFastMutex::Lock((uint)puVar1,uVar3);
goto LAB_001decbf;
}
}
in_stack_00000004[0xe] = in_stack_00000004[0xe] + 1;
LAB_001decbf:
CUtlLinkedList<EntityInfo_t,unsigned_short,false,unsigned_short,CUtlMemoryStack<UtlLinkedListElem_t<EntityInfo_t,unsigned_short>,unsigned_short,65535u,1024u,0u>>
::Unlink((CUtlLinkedList<EntityInfo_t,unsigned_short,false,unsigned_short,CUtlMemoryStack<UtlLinkedListElem_t<EntityInfo_t,unsigned_short>,unsigned_short,65535u,1024u,0u>>
*)(in_stack_00000004 + 1),in_stack_00000008);
*(short *)((uint)in_stack_00000008 * 0x34 + in_stack_00000004[4] + 0x32) =
(short)in_stack_00000004[10];
*(ushort *)(in_stack_00000004 + 10) = in_stack_00000008;
in_stack_00000004[0xe] = in_stack_00000004[0xe] + -1;
uVar3 = in_stack_00000004[0xe];
if (uVar3 == 0) {
LOCK();
uVar3 = *puVar1;
*puVar1 = 0;
UNLOCK();
}
return uVar3;
}
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.