CEntityDataInstantiator<groundlink_t>::CreateDataObject
0x0047f7c0 · 454 bytes · __thiscall
_ZN23CEntityDataInstantiatorI12groundlink_tE16CreateDataObjectEPK11CBaseEntity
Decompiled
undefined (2 params)
/* CEntityDataInstantiator<groundlink_t>::CreateDataObject(CBaseEntity const*) */
undefined4 __thiscall
CEntityDataInstantiator<groundlink_t>::CreateDataObject
(CEntityDataInstantiator<groundlink_t> *this,CBaseEntity *param_1)
{
char cVar1;
uint uVar2;
undefined4 *puVar3;
int *piVar4;
int iVar5;
CUtlVector<CEntityDataInstantiator<groundlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<groundlink_t>::HashEntry,int>>
*this_00;
uint uVar6;
int iVar7;
uint local_34;
CBaseEntity *local_24;
undefined4 local_20;
local_20 = 0;
local_24 = param_1;
local_34 = (**(code **)(this + 0x1c))(&local_24);
if (this[0x20] == (CEntityDataInstantiator<groundlink_t>)0x0) {
local_34 = local_34 % *(uint *)(this + 0x10);
}
else {
local_34 = local_34 & *(uint *)(this + 0x24);
}
uVar6 = 0;
piVar4 = (int *)(*(int *)(this + 4) + local_34 * 0x14);
uVar2 = piVar4[3];
if ((int)uVar2 < 1) {
LAB_0047f82e:
if ((uVar2 != uVar6) && (uVar2 = local_34 << 0x10 | uVar6, uVar2 != 0xffffffff)) {
iVar5 = (uVar6 & 0xffff) * 8;
iVar7 = (uVar2 >> 0x10) * 0x14;
goto LAB_0047f855;
}
}
else {
do {
cVar1 = (**(code **)(this + 0x18))(*piVar4 + uVar6 * 8,&local_24);
if (cVar1 != '\0') goto LAB_0047f82e;
uVar6 = uVar6 + 1;
} while (uVar6 != uVar2);
}
local_34 = (**(code **)(this + 0x1c))(&local_24);
if (this[0x20] == (CEntityDataInstantiator<groundlink_t>)0x0) {
local_34 = local_34 % *(uint *)(this + 0x10);
}
else {
local_34 = local_34 & *(uint *)(this + 0x24);
}
uVar6 = 0;
piVar4 = (int *)(*(int *)(this + 4) + local_34 * 0x14);
uVar2 = piVar4[3];
if ((int)uVar2 < 1) {
LAB_0047f8e5:
if (uVar2 == uVar6) goto LAB_0047f952;
}
else {
do {
cVar1 = (**(code **)(this + 0x18))(*piVar4 + uVar6 * 8,&local_24);
if (cVar1 != '\0') goto LAB_0047f8e5;
uVar6 = uVar6 + 1;
} while (uVar6 != uVar2);
LAB_0047f952:
this_00 = (CUtlVector<CEntityDataInstantiator<groundlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<groundlink_t>::HashEntry,int>>
*)(local_34 * 0x14 + *(int *)(this + 4));
uVar6 = *(uint *)(this_00 + 0xc);
CUtlVector<CEntityDataInstantiator<groundlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<groundlink_t>::HashEntry,int>>
::GrowVector(this_00,1);
CUtlVector<CEntityDataInstantiator<groundlink_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<groundlink_t>::HashEntry,int>>
::ShiftElementsRight(this_00,uVar6,1);
puVar3 = (undefined4 *)(*(int *)this_00 + uVar6 * 8);
if (puVar3 != (undefined4 *)0x0) {
*puVar3 = local_24;
puVar3[1] = local_20;
}
}
puVar3 = ::operator_new(0xc);
*puVar3 = 0xffffffff;
iVar5 = (uVar6 & 0xffff) * 8;
iVar7 = ((local_34 << 0x10 | uVar6) >> 0x10) * 0x14;
*(undefined4 **)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5) = puVar3;
_V_memset(*(void **)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5),0,0xc);
LAB_0047f855:
return *(undefined4 *)(*(int *)(*(int *)(this + 4) + iVar7) + 4 + iVar5);
}
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.