CPhysics2Prop::Spawn
0x00802d10 · 385 bytes · __thiscall
_ZN13CPhysics2Prop5SpawnEv
Decompiled
undefined (1 param)
/* CPhysics2Prop::Spawn() */
void __thiscall CPhysics2Prop::Spawn(CPhysics2Prop *this)
{
undefined2 uVar1;
code *pcVar2;
char cVar3;
undefined4 uVar4;
int iVar5;
int *piVar6;
char *pcVar7;
if (g_pPhysics2 != (int *)0x0) {
(**(code **)(*g_pPhysics2 + 0x44))(g_pPhysics2,"/data/src/game/server/prop_physics2.cpp",0x1b);
}
/* try { // try from 00802d48 to 00802d71 has its CatchHandler @ 00802ea3 */
CBaseEntity::SetNetworkQuantizeOriginAngAngles((CBaseEntity *)this,true);
if (*(char **)(this + 0x7c) != "physics2_prop") {
pcVar7 = "physics2_prop";
cVar3 = CBaseEntity::ClassMatchesComplex((CBaseEntity *)this,"physics2_prop");
if (cVar3 == '\0') goto LAB_00802d6a;
}
pcVar7 = "prop_physics2";
/* try { // try from 00802dab to 00802e58 has its CatchHandler @ 00802ea3 */
CBaseEntity::SetClassname((char *)this);
LAB_00802d6a:
CBaseEntity::Spawn((CBaseEntity *)this);
if (((byte)this[0x14c] & 1) == 0) {
pcVar2 = *(code **)(*modelinfo + 0x1c);
uVar4 = (**(code **)(*(int *)this + 0x1c))(this,pcVar7);
iVar5 = (*pcVar2)(modelinfo,uVar4);
uVar1 = *(undefined2 *)(iVar5 + 2);
pcVar2 = *(code **)(*g_pPhys2World + 0x80);
/* try { // try from 00802e83 to 00802e98 has its CatchHandler @ 00802ea3 */
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
piVar6 = (int *)(*pcVar2)(g_pPhys2World,*(undefined4 *)(iVar5 + 8),
**(undefined4 **)(iVar5 + 0xc),uVar1,this + 0x2e0,this + 0x37c,0);
*(int **)(this + 0x13f4) = piVar6;
(**(code **)(*piVar6 + 0xc))(piVar6,this);
(**(code **)(**(int **)(this + 0x13f4) + 0x78))(*(int **)(this + 0x13f4));
if (g_pPhysics2 != (int *)0x0) {
/* WARNING: Could not recover jumptable at 0x00802e71. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*g_pPhysics2 + 0x48))();
return;
}
}
else if (g_pPhysics2 != (int *)0x0) {
/* WARNING: Could not recover jumptable at 0x00802d97. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*g_pPhysics2 + 0x48))();
return;
}
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.