CBaseEntity::VPhysicsInitShadow
0x0040feb0 · 648 bytes · __thiscall
_ZN11CBaseEntity18VPhysicsInitShadowEbbP7solid_t
Decompiled
undefined (4 params)
/* CBaseEntity::VPhysicsInitShadow(bool, bool, solid_t*) */
IPhysicsObject * __thiscall
CBaseEntity::VPhysicsInitShadow(CBaseEntity *this,bool param_1,bool param_2,solid_t *param_3)
{
CBaseEntity *pCVar1;
Vector *pVVar2;
char cVar3;
int iVar4;
IPhysicsObject *pIVar5;
Vector *pVVar6;
Vector *pVVar7;
float *pfVar8;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
cVar3 = VPhysicsInitSetup(this);
if (cVar3 != '\0') {
pCVar1 = this + 0x194;
iVar4 = (**(code **)(*(int *)(this + 0x194) + 0x2c))(pCVar1);
if (iVar4 != 0) {
pVVar2 = (Vector *)(this + 0x2e0);
if (((byte)this[0x14d] & 8) != 0) {
CalcAbsolutePosition(this);
if (((byte)this[0x14d] & 8) != 0) {
CalcAbsolutePosition(this);
}
}
local_40 = *(undefined4 *)(this + 0x37c);
local_3c = *(undefined4 *)(this + 0x380);
local_38 = *(undefined4 *)(this + 900);
iVar4 = (**(code **)(*(int *)(this + 0x194) + 0x2c))(pCVar1);
if (iVar4 == 2) {
pfVar8 = (float *)(**(code **)(*(int *)(this + 0x194) + 4))(pCVar1);
local_34 = *pfVar8 + 0.21875;
local_30 = pfVar8[1] + 0.21875;
local_2c = pfVar8[2] + 0.21875;
pfVar8 = (float *)(**(code **)(*(int *)(this + 0x194) + 8))(pCVar1);
local_28 = *pfVar8 - 0.21875;
local_24 = pfVar8[1] - 0.21875;
local_20 = pfVar8[2] - 0.21875;
pIVar5 = (IPhysicsObject *)
PhysModelCreateBox(this,(Vector *)&local_34,(Vector *)&local_28,pVVar2,false);
local_40 = vec3_angle;
local_3c = DAT_01053d40;
local_38 = DAT_01053d44;
}
else {
iVar4 = (**(code **)(*(int *)(this + 0x194) + 0x2c))();
if (iVar4 == 3) {
pVVar6 = (Vector *)(**(code **)(*(int *)(this + 0x194) + 8))(pCVar1);
pVVar7 = (Vector *)(**(code **)(*(int *)(this + 0x194) + 4))(pCVar1);
pIVar5 = (IPhysicsObject *)
PhysModelCreateOBB(this,pVVar7,pVVar6,pVVar2,(QAngle *)&local_40,false);
}
else {
iVar4 = (**(code **)(*(int *)this + 0x1c))(this);
pIVar5 = (IPhysicsObject *)
PhysModelCreate(this,iVar4,pVVar2,(QAngle *)&local_40,param_3,8);
}
}
if (pIVar5 != (IPhysicsObject *)0x0) {
VPhysicsSetObject(this,pIVar5);
(**(code **)(*(int *)pIVar5 + 0x114))(pIVar5,0x461c4000,0x461c4000,param_1,param_2);
(**(code **)(*(int *)pIVar5 + 0x118))(pIVar5,pVVar2,&local_40,0,0);
CollisionRulesChanged(SUB41(this,0));
return pIVar5;
}
}
}
return (IPhysicsObject *)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.