CBaseDoor::CreateVPhysics
0x006669b0 · 389 bytes · __thiscall
_ZN9CBaseDoor14CreateVPhysicsEv
Decompiled
undefined (1 param)
/* CBaseDoor::CreateVPhysics() */
undefined4 __thiscall CBaseDoor::CreateVPhysics(CBaseDoor *this)
{
CCollisionProperty *this_00;
float fVar1;
CBaseEdict *this_01;
char cVar2;
int iVar3;
undefined4 uVar4;
uint uVar5;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
float local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
CBaseDoor *local_28;
undefined4 local_20;
if (*(char **)(this + 0x7c) != "func_water") {
cVar2 = CBaseEntity::ClassMatchesComplex((CBaseEntity *)this,"func_water");
if (cVar2 == '\0') {
CBaseEntity::VPhysicsInitShadow((CBaseEntity *)this,false,false,(solid_t *)0x0);
return 1;
}
}
this_00 = (CCollisionProperty *)(this + 0x194);
CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 0x20));
uVar5 = *(uint *)(this + 0x148) | 0x1000;
if (*(uint *)(this + 0x148) != uVar5) {
if (this[0x6c] == (CBaseDoor)0x0) {
this_01 = *(CBaseEdict **)(this + 0x30);
if (this_01 != (CBaseEdict *)0x0) {
*(uint *)this_01 = *(uint *)this_01 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(this_01);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseDoor)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x148) = uVar5;
}
uVar4 = CBaseEntity::VPhysicsInitShadow((CBaseEntity *)this,false,false,(solid_t *)0x0);
local_34 = 0x3c23d70a;
local_50 = 0;
local_4c = 0;
local_48 = 0x3f800000;
iVar3 = (**(code **)(*(int *)(this + 0x194) + 0x20))(this_00);
fVar1 = *(float *)(iVar3 + 8);
iVar3 = (**(code **)(*(int *)(this + 0x194) + 8))(this_00);
local_28 = this;
local_40 = 0;
local_3c = 0;
local_44 = fVar1 + *(float *)(iVar3 + 8) + -1.0;
local_38 = 0;
local_30 = 0x3dcccccd;
local_2c = 0x3c23d70a;
local_20 = 0x20;
(**(code **)(*physenv + 0x30))(physenv,uVar4,&local_50);
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.