CPhysSphere::CreateVPhysics
0x007fdb00 · 373 bytes · __thiscall
_ZN11CPhysSphere14CreateVPhysicsEv
Decompiled
undefined (1 param)
/* CPhysSphere::CreateVPhysics() */
undefined4 __thiscall CPhysSphere::CreateVPhysics(CPhysSphere *this)
{
code *pcVar1;
IPhysicsObject *pIVar2;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
char *local_30;
CPhysSphere *local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),2);
local_48 = 0x41400000;
local_44 = 0x41400000;
local_40 = 0x41400000;
local_54 = 0xc1400000;
local_50 = 0xc1400000;
local_4c = 0xc1400000;
CBaseEntity::SetCollisionBounds((CBaseEntity *)this,(Vector *)&local_54,(Vector *)&local_48);
local_2c = this;
local_48 = 0;
local_44 = 0x3f800000;
local_40 = 0x3f800000;
local_3c = 0x3dcccccd;
local_38 = 0x3dcccccd;
local_34 = 0x3d4ccccd;
local_30 = "DEFAULT";
local_28 = 0;
local_24 = 0x3f800000;
local_20 = 1;
pcVar1 = *(code **)(*physenv + 0x28);
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pIVar2 = (IPhysicsObject *)
(*pcVar1)(physenv,0x41400000,0,this + 0x2e0,this + 0x37c,(Vector *)&local_48,0);
if (pIVar2 != (IPhysicsObject *)0x0) {
CBaseEntity::VPhysicsSetObject((CBaseEntity *)this,pIVar2);
CBaseEntity::SetMoveType((CBaseEntity *)this,6,0);
(**(code **)(*(int *)pIVar2 + 100))(pIVar2);
}
return 1;
}
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.