CPhysMagnet::Spawn
0x007a1bb0 · 437 bytes · __thiscall
_ZN11CPhysMagnet5SpawnEv
Decompiled
undefined (1 param)
/* CPhysMagnet::Spawn() */
void __thiscall CPhysMagnet::Spawn(CPhysMagnet *this)
{
CCollisionProperty *pCVar1;
code *pcVar2;
int *piVar3;
undefined1 *puVar4;
int iVar5;
undefined4 uVar6;
undefined4 uVar7;
uint uVar8;
int in_GS_OFFSET;
undefined1 *local_670 [4];
solid_t local_660 [1560];
float local_48;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pCVar1 = (CCollisionProperty *)(this + 0x194);
(**(code **)(*(int *)this + 0x6c))(this);
CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
CCollisionProperty::SetSolid(pCVar1,6);
pcVar2 = *(code **)(*(int *)this + 0x70);
(**(code **)(*(int *)this + 0x20))(local_670,this);
puVar4 = &DAT_00d539c2;
if (local_670[0] != (undefined1 *)0x0) {
puVar4 = local_670[0];
}
(*pcVar2)(this,puVar4);
if (this[0x105] != (CPhysMagnet)0x1) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
this[0x105] = (CPhysMagnet)0x1;
}
iVar5 = (**(code **)(*(int *)this + 0x1c))(this);
PhysModelParseSolid(local_660,(CBaseEntity *)this,iVar5);
if (0.0 < *(float *)(this + 0x1428)) {
local_48 = *(float *)(this + 0x1428) * local_48;
}
PhysSolidOverride(local_660,*(undefined4 *)(this + 0x142c));
uVar6 = (**(code **)(*(int *)(this + 0x194) + 0x30))(pCVar1);
uVar7 = (**(code **)(*(int *)(this + 0x194) + 0x2c))(pCVar1);
CBaseEntity::VPhysicsInitNormal((CBaseEntity *)this,uVar7,uVar6,1,local_660);
piVar3 = *(int **)(this + 0x238);
if (piVar3 != (int *)0x0) {
uVar8 = *(uint *)(this + 0x148);
if ((uVar8 & 1) == 0) {
(**(code **)(*piVar3 + 100))(piVar3);
uVar8 = *(uint *)(this + 0x148);
}
if ((uVar8 & 2) != 0) {
(**(code **)(**(int **)(this + 0x238) + 0x40))(*(int **)(this + 0x238),0);
}
}
this[0x1450] = (CPhysMagnet)0x1;
*(undefined4 *)(this + 0x144c) = 0;
*(undefined4 *)(this + 0x1454) = 0;
*(undefined4 *)(this + 0x145c) = 0;
CBaseAnimating::Spawn((CBaseAnimating *)this);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.