CPhysBox::Spawn
0x0079de50 · 596 bytes · __thiscall
_ZN8CPhysBox5SpawnEv
Decompiled
undefined (1 param)
/* CPhysBox::Spawn() */
void __thiscall CPhysBox::Spawn(CPhysBox *this)
{
undefined4 uVar1;
CBaseEdict *this_00;
code *pcVar2;
undefined4 uVar3;
uint uVar4;
int iVar5;
undefined1 *puVar6;
uint uVar7;
undefined1 *local_10;
uVar3 = func_breakdmg_club._28_4_;
*(undefined4 *)(this + 0x4bc) = *(undefined4 *)(func_breakdmg_bullet._28_4_ + 0x2c);
uVar1 = func_breakdmg_explosive._28_4_;
*(undefined4 *)(this + 0x4c0) = *(undefined4 *)(uVar3 + 0x2c);
uVar1 = *(undefined4 *)(uVar1 + 0x2c);
*(undefined4 *)(this + 0x4c8) = 0x3f800000;
*(undefined4 *)(this + 0x4c4) = uVar1;
CBreakable::ParsePropData((CBreakable *)this);
(**(code **)(*(int *)this + 0x6c))(this);
iVar5 = 1;
if (0 < *(int *)(this + 0x100)) {
iVar5 = *(int *)(this + 0x100);
}
if (iVar5 != *(int *)(this + 0xfc)) {
(**(code **)(*(int *)this + 0x20c))(this,this + 0xfc);
*(int *)(this + 0xfc) = iVar5;
}
uVar4 = *(uint *)(this + 0x148);
if (((uVar4 & 1) == 0) && (*(int *)(this + 0x100) != 0)) {
if (this[0x105] != (CPhysBox)0x2) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
this[0x105] = (CPhysBox)0x2;
}
}
else {
if (this[0x105] != (CPhysBox)0x1) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
uVar4 = *(uint *)(this + 0x148);
this[0x105] = (CPhysBox)0x1;
}
uVar7 = uVar4 | 0x400;
if (uVar7 != uVar4) {
if (this[0x6c] == (CPhysBox)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar5 + 2) = 0;
}
*(uint *)(this + 0x148) = uVar7;
}
else {
this[0x70] = (CPhysBox)((byte)this[0x70] | 1);
*(uint *)(this + 0x148) = uVar7;
}
}
}
CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
pcVar2 = *(code **)(*(int *)this + 0x70);
(**(code **)(*(int *)this + 0x20))(&local_10,this);
puVar6 = &DAT_00d539c2;
if (local_10 != (undefined1 *)0x0) {
puVar6 = local_10;
}
(*pcVar2)(this,puVar6);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),6);
if (((byte)this[0x149] & 0x40) != 0) {
CBaseEntity::SetCollisionGroup((CBaseEntity *)this,1);
}
if (this[0x51c] != (CPhysBox)0x0) {
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 4));
}
(**(code **)(*(int *)this + 0x290))(this);
*(undefined4 *)(this + 0x5e4) = 0xffffffff;
*(code **)(this + 0xd8) = CBreakable::BreakTouch;
*(undefined4 *)(this + 0xdc) = 0;
if (((byte)this[0x148] & 1) != 0) {
*(undefined4 *)(this + 0xd8) = 0;
}
if (*(float *)(this + 0x488) == 0.0) {
*(undefined4 *)(this + 0x488) = 0x3f800000;
}
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.