CRotDoor::Spawn
0x00668000 · 518 bytes · __thiscall
_ZN8CRotDoor5SpawnEv
Decompiled
undefined (1 param)
/* CRotDoor::Spawn() */
void __thiscall CRotDoor::Spawn(CRotDoor *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float local_10;
CBaseDoor::Spawn((CBaseDoor *)this);
CBaseToggle::AxisDir((CBaseToggle *)this);
fVar8 = *(float *)(this + 0x46c);
if ((*(uint *)(this + 0x148) & 2) == 0) {
local_10 = *(float *)(this + 0x474);
fVar7 = *(float *)(this + 0x470);
}
else {
fVar8 = -fVar8;
*(float *)(this + 0x46c) = fVar8;
fVar7 = -*(float *)(this + 0x470);
*(float *)(this + 0x470) = fVar7;
local_10 = -*(float *)(this + 0x474);
*(float *)(this + 0x474) = local_10;
}
fVar4 = *(float *)(this + 0x444);
fVar1 = *(float *)(this + 0x3a8);
fVar2 = *(float *)(this + 0x3ac);
fVar3 = *(float *)(this + 0x3b0);
*(float *)(this + 0x478) = fVar1;
*(float *)(this + 0x47c) = fVar2;
*(float *)(this + 0x480) = fVar3;
fVar6 = fVar8 * fVar4 + fVar1;
fVar5 = fVar7 * fVar4 + fVar2;
fVar4 = fVar4 * local_10 + fVar3;
*(float *)(this + 0x484) = fVar6;
*(float *)(this + 0x488) = fVar5;
*(float *)(this + 0x48c) = fVar4;
if ((*(uint *)(this + 0x148) & 1) == 0) {
if (*(int *)(this + 0x500) == 1) {
(**(code **)(*(int *)this + 0x1dc))(this,0,this + 0x484,0);
*(undefined4 *)(this + 0x440) = 0;
}
else {
*(undefined4 *)(this + 0x440) = 1;
}
}
else {
*(float *)(this + 0x488) = fVar2;
*(float *)(this + 0x480) = fVar4;
*(float *)(this + 0x484) = fVar1;
*(float *)(this + 0x48c) = fVar3;
*(float *)(this + 0x478) = fVar6;
*(float *)(this + 0x47c) = fVar5;
*(float *)(this + 0x46c) = -fVar8;
*(float *)(this + 0x470) = -fVar7;
*(float *)(this + 0x474) = -local_10;
(**(code **)(*(int *)this + 0x1dc))(this,0,this + 0x478,0);
*(undefined4 *)(this + 0x440) = 1;
}
if (this[0x600] != (CRotDoor)0x0) {
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),1);
}
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.