CChainsaw::CChainsaw
0x00531b00 · 644 bytes · __thiscall
_ZN9CChainsawC1Ev
Decompiled
undefined (1 param)
/* CChainsaw::CChainsaw() */
void __thiscall CChainsaw::CChainsaw(CChainsaw *this)
{
CBaseEdict *pCVar1;
int iVar2;
CChainsaw *__s1;
undefined4 local_20 [4];
CTerrorWeapon::CTerrorWeapon((CTerrorWeapon *)this);
*(undefined ***)this = &PTR__CChainsaw_00c358e8;
*(undefined **)(this + 0x1510) = &DAT_00c35ff0;
*(undefined ***)(this + 0x1810) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x1814) = 0;
*(undefined4 *)(this + 0x1818) = 0xbf800000;
*(undefined ***)(this + 0x1838) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x183c) = 0;
*(undefined4 *)(this + 0x1840) = 0xbf800000;
*(undefined ***)(this + 0x1844) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x1848) = 0;
*(undefined4 *)(this + 0x184c) = 0xbf800000;
this[0x17dc] = (CChainsaw)0x0;
if (*(int *)(this + 0x17e0) != 0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x17e0) = 0;
}
if (this[0x17e4] != (CChainsaw)0x0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
this[0x17e4] = (CChainsaw)0x0;
}
*(undefined4 *)(this + 0x17e8) = 0;
*(undefined4 *)(this + 0x17ec) = 0;
this[0x17f0] = (CChainsaw)0x0;
*(undefined4 *)(this + 0x17f4) = 0;
*(undefined4 *)(this + 0x17f8) = 0;
*(undefined4 *)(this + 0x17fc) = 0;
*(undefined4 *)(this + 0x1800) = 0;
*(undefined4 *)(this + 0x1808) = 0;
*(undefined4 *)(this + 0x180c) = 100;
if (*(float *)(this + 0x1818) != -1.0) {
(**(code **)(*(int *)(this + 0x1810) + 4))(this + 0x1810,this + 0x1818);
*(undefined4 *)(this + 0x1818) = 0xbf800000;
}
*(undefined4 *)(this + 0x181c) = 0;
__s1 = this + 0x1828;
do {
*(undefined4 *)(__s1 + -8) = 0;
local_20[0] = 0;
iVar2 = memcmp(__s1,local_20,4);
if (iVar2 != 0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
/* try { // try from 00531cb6 to 00531d7a has its CatchHandler @ 00531da6 */
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)__s1 = 0;
}
*(undefined4 *)(__s1 + 8) = 0xffffffff;
__s1 = __s1 + 4;
} while (__s1 != this + 0x1830);
if (*(float *)(this + 0x184c) == -1.0) {
return;
}
(**(code **)(*(int *)(this + 0x1844) + 4))(this + 0x1844,this + 0x184c);
*(undefined4 *)(this + 0x184c) = 0xbf800000;
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.