CC_Prop_Physics_Create
0x007f7d90 · 389 bytes · __cdecl
_Z22CC_Prop_Physics_CreateRK8CCommand
Decompiled
undefined (1 param)
/* CC_Prop_Physics_Create(CCommand const&) */
void CC_Prop_Physics_Create(CCommand *param_1)
{
CBasePlayer *this;
undefined1 *puVar1;
int in_GS_OFFSET;
float local_250;
float local_24c;
float local_248;
Vector local_244 [12];
float local_238;
float local_234;
float local_230;
float local_22c;
float local_228;
float local_224;
char local_220 [512];
int local_20;
puVar1 = &stack0xfffffd84;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)param_1 == 2) {
V_snprintf(local_220,0x200,"models/%s");
V_DefaultExtension(local_220,".mdl",0x200);
this = (CBasePlayer *)UTIL_GetCommandClient();
CBasePlayer::EyeVectors(this,(Vector *)&local_250,(Vector *)0x0,(Vector *)0x0);
(**(code **)(*(int *)this + 0x234))();
local_22c = local_250 * 56755.84 + local_238;
local_224 = local_248 * 56755.84 + local_230;
local_228 = local_24c * 56755.84 + local_234;
(**(code **)(*(int *)this + 0x234))();
puVar1 = &stack0xfffffd7c;
CreatePhysicsProp(local_220,local_244,(Vector *)&local_22c,(IHandleEntity *)this,true,
"physics_prop");
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)(puVar1 + -4) = &UNK_007f7f1d;
__stack_chk_fail();
}
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.