CSpatialPartition::Init
0x001de290 · 210 bytes · __thiscall
_ZN17CSpatialPartition4InitERK6VectorS2_
Decompiled
undefined (3 params)
/* CSpatialPartition::Init(Vector const&, Vector const&) */
void __thiscall CSpatialPartition::Init(CSpatialPartition *this,Vector *param_1,Vector *param_2)
{
char cVar1;
uint uVar2;
int iVar3;
CUtlLinkedList<EntityInfo_t,unsigned_short,false,unsigned_short,CUtlMemoryStack<UtlLinkedListElem_t<EntityInfo_t,unsigned_short>,unsigned_short,65535u,1024u,0u>>
::Purge((CUtlLinkedList<EntityInfo_t,unsigned_short,false,unsigned_short,CUtlMemoryStack<UtlLinkedListElem_t<EntityInfo_t,unsigned_short>,unsigned_short,65535u,1024u,0u>>
*)(this + 4));
iVar3 = *(int *)(this + 0x20);
if (iVar3 < 0x100) {
*(undefined4 *)(this + 0x20) = 0x100;
iVar3 = (0x100 - iVar3) * 0x34;
uVar2 = *(uint *)(this + 0x1c);
if (iVar3 != 0) {
uVar2 = -uVar2 & iVar3 + -1 + uVar2;
}
iVar3 = *(int *)(this + 4);
if ((uVar2 + iVar3 <= *(uint *)(this + 8)) ||
(cVar1 = CMemoryStack::CommitTo((uchar *)(this + 4)), cVar1 != '\0')) {
*(uint *)(this + 4) = uVar2 + iVar3;
}
}
*(undefined4 *)(this + 0x30) = *(undefined4 *)(this + 0x10);
(**(code **)(*(int *)(this + 0x40) + 8))(this + 0x40,this,0,param_1,param_2);
(**(code **)(*(int *)(this + 0x130) + 8))(this + 0x130,this,1,param_1,param_2);
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.