CRagdollBoogie::Create
0x00804ab0 · 237 bytes · __cdecl
_ZN14CRagdollBoogie6CreateEP11CBaseEntityfffi
Decompiled
undefined (5 params)
/* CRagdollBoogie::Create(CBaseEntity*, float, float, float, int) */
CRagdollBoogie *
CRagdollBoogie::Create(CBaseEntity *param_1,float param_2,float param_3,float param_4,int param_5)
{
CBaseEdict *this;
int iVar1;
CRagdollBoogie *this_00;
uint uVar2;
if (param_1 != (CBaseEntity *)0x0) {
iVar1 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CRagdollProp::typeinfo,0);
if (iVar1 != 0) {
this_00 = (CRagdollBoogie *)CreateEntityByName("env_ragdoll_boogie",-1,true);
if (this_00 != (CRagdollBoogie *)0x0) {
uVar2 = param_5 | *(uint *)(this_00 + 0x148);
if (*(uint *)(this_00 + 0x148) != uVar2) {
if (this_00[0x6c] == (CRagdollBoogie)0x0) {
this = *(CBaseEdict **)(this_00 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar1 + 2) = 0;
}
}
else {
this_00[0x70] = (CRagdollBoogie)((byte)this_00[0x70] | 1);
}
*(uint *)(this_00 + 0x148) = uVar2;
}
AttachToEntity(this_00,param_1);
*(float *)(this_00 + 0x440) = param_3;
*(float *)(this_00 + 0x444) = param_4;
*(float *)(this_00 + 0x448) = param_2;
(**(code **)(*(int *)this_00 + 100))(this_00);
return this_00;
}
}
}
return (CRagdollBoogie *)0x0;
}
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.