CreateRagGib
0x006d64c0 · 242 bytes · __cdecl
_Z12CreateRagGibPKcRK6VectorRK6QAngleS3_fb
Decompiled
undefined (6 params)
/* CreateRagGib(char const*, Vector const&, QAngle const&, Vector const&, float, bool) */
CBaseEntity *
CreateRagGib(char *param_1,Vector *param_2,QAngle *param_3,Vector *param_4,float param_5,
bool param_6)
{
code *pcVar1;
CBaseEntity *this;
int *piVar2;
longdouble lVar3;
this = (CBaseEntity *)CreateEntityByName("raggib",-1,true);
CBaseEntity::SetLocalAngles(this,param_3);
if (this == (CBaseEntity *)0x0) {
Msg("**Can\'t create ragdoll gib!\n");
this = (CBaseEntity *)0x0;
}
else {
if (param_6) {
piVar2 = (int *)(**(code **)(*(int *)this + 0xf0))(this);
if (piVar2 != (int *)0x0) {
pcVar1 = *(code **)(*piVar2 + 0x380);
lVar3 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x41000000,0x41400000);
(*pcVar1)(piVar2,(float)lVar3,0,0,0);
}
}
CRagGib::Spawn((CRagGib *)this,param_1,param_2,param_4,param_5);
}
return this;
}
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.