CBaseEntity::SetParent
0x00607f90 · 421 bytes · __cdecl
_ZN11CBaseEntity9SetParentE8string_tPS_i
Decompiled
undefined (3 params)
/* CBaseEntity::SetParent(string_t, CBaseEntity*, int) */
void CBaseEntity::SetParent(CBaseEntity *param_1,char *param_2,CBaseEntity *param_3)
{
CBaseEntity *pCVar1;
int iVar2;
undefined4 uVar3;
undefined1 *puVar4;
if (param_2 == (char *)0x0) {
param_2 = "";
pCVar1 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"",(CBaseEntity *)0x0,
param_3,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,pCVar1,"",(CBaseEntity *)0x0,param_3,
(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
}
else {
pCVar1 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,param_2,(CBaseEntity *)0x0,
param_3,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (pCVar1 == (CBaseEntity *)0x0) {
GetDebugName(param_1);
Msg();
return;
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,pCVar1,param_2,(CBaseEntity *)0x0,param_3,
(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
}
if (iVar2 != 0) {
uVar3 = GetDebugName(param_1);
puVar4 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar4 = *(undefined1 **)(param_1 + 0x7c);
}
Msg("Entity %s(%s) is ambiguously parented to %s, because there is more than one entity by that name.\n"
,puVar4,uVar3,param_2);
}
/* WARNING: Could not recover jumptable at 0x0060807e. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)param_1 + 0x98))();
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.