CChainsaw::DebugChainsaw
0x00532e30 · 1329 bytes · __thiscall
_ZN9CChainsaw13DebugChainsawEb
Decompiled
undefined (2 params)
/* CChainsaw::DebugChainsaw(bool) */
void __thiscall CChainsaw::DebugChainsaw(CChainsaw *this,bool param_1)
{
float fVar1;
float fVar2;
CBaseEntity *pCVar3;
code *pcVar4;
char cVar5;
undefined4 uVar6;
CStudioHdr *pCVar7;
int iVar8;
CBaseAnimatingOverlay *this_00;
char cVar9;
CStudioHdr *pCVar10;
longdouble lVar11;
char *pcVar12;
cVar9 = (-!param_1 & 0xfU) + 6;
if (*(int *)(this + 0x30) == 0) {
iVar8 = 0;
}
else {
iVar8 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
(**(code **)(*engine + 0xbc))
(engine,(-!param_1 & 0xfU) + 5,"-------------- SERVER (%d)frame %d --------------",iVar8
,*(undefined4 *)(gpGlobals + 4));
iVar8 = *(int *)(this + 0x17e0);
if (iVar8 == 1) {
iVar8 = *engine;
pcVar12 = "STARTUP";
}
else if (iVar8 < 2) {
if (iVar8 != 0) goto LAB_00532eeb;
iVar8 = *engine;
pcVar12 = "INACTIVE";
}
else if (iVar8 == 2) {
iVar8 = *engine;
pcVar12 = "IDLE";
}
else {
if (iVar8 != 3) goto LAB_00532eeb;
iVar8 = *engine;
pcVar12 = "ACTIVE";
}
(**(code **)(iVar8 + 0xbc))(engine,cVar9,"State: %s",pcVar12);
cVar9 = (-!param_1 & 0xfU) + 7;
LAB_00532eeb:
pCVar3 = *(CBaseEntity **)(this + 0x1804);
if (pCVar3 == (CBaseEntity *)0x0) {
(**(code **)(*engine + 0xbc))(engine,cVar9,"Owner: NONE");
}
else {
pcVar4 = *(code **)(*engine + 0xbc);
if (*(int *)(pCVar3 + 0x30) == 0) {
iVar8 = 0;
}
else {
iVar8 = *(int *)(pCVar3 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
uVar6 = CBaseEntity::GetDebugName(pCVar3);
(*pcVar4)(engine,cVar9,"Owner: %s (%d)",uVar6,iVar8);
}
(**(code **)(*engine + 0xbc))
(engine,cVar9 + '\x01',"PP_IDLE: %2.2f\n",(double)*(float *)(this + 0x1820));
(**(code **)(*engine + 0xbc))
(engine,cVar9 + '\x02',"PP_ATTACK: %2.2f\n",(double)*(float *)(this + 0x1824));
pcVar12 = "ACT_MP_GESTURE_VC_NODYES";
if (this[0x17dc] == (CChainsaw)0x0) {
pcVar12 = "ACT_MP_GESTURE_VC_NODNO";
}
(**(code **)(*engine + 0xbc))(engine,cVar9 + '\x03',"Deployed: %s",pcVar12 + 0x15);
pcVar4 = *(code **)(*engine + 0xbc);
cVar5 = (**(code **)(*(int *)this + 0x434))(this);
pcVar12 = "ACT_MP_GESTURE_VC_NODYES";
if (cVar5 == '\0') {
pcVar12 = "ACT_MP_GESTURE_VC_NODNO";
}
(*pcVar4)(engine,cVar9 + '\x04',"Visible: %s",pcVar12 + 0x15);
pcVar12 = "ACT_MP_GESTURE_VC_NODYES";
if (this[0x17e4] == (CChainsaw)0x0) {
pcVar12 = "ACT_MP_GESTURE_VC_NODNO";
}
(**(code **)(*engine + 0xbc))(engine,cVar9 + '\x05',"Hitting: %s",pcVar12 + 0x15);
(**(code **)(*engine + 0xbc))
(engine,cVar9 + '\x06',"AmmoUseAccum: %2.2f",(double)*(float *)(this + 0x17e8));
(**(code **)(*engine + 0xbc))
(engine,cVar9 + '\a',"HitIntervalAccum: %2.2f",(double)*(float *)(this + 0x17ec));
(**(code **)(*engine + 0xbc))(engine,cVar9 + '\b',"Pitch: %d%%",*(undefined4 *)(this + 0x180c));
fVar1 = *(float *)(this + 0x1818);
pcVar4 = *(code **)(*engine + 0xbc);
lVar11 = (longdouble)CountdownTimer::Now();
(*pcVar4)(engine,cVar9 + '\t',"PitchDownTimer: %2.2f\n",(double)(fVar1 - (float)lVar11));
pCVar3 = *(CBaseEntity **)(this + 0x1808);
if (pCVar3 != (CBaseEntity *)0x0) {
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
this_00 = (CBaseAnimatingOverlay *)pCVar3;
if (pCVar7 == (CStudioHdr *)0x0) {
iVar8 = CBaseEntity::GetModel(pCVar3);
if (iVar8 == 0) {
this_00 = *(CBaseAnimatingOverlay **)(this + 0x1808);
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)pCVar3);
this_00 = *(CBaseAnimatingOverlay **)(this + 0x1808);
pCVar7 = *(CStudioHdr **)(pCVar3 + 0x13e0);
}
}
pCVar10 = (CStudioHdr *)0x0;
if ((pCVar7 != (CStudioHdr *)0x0) && (*(int *)pCVar7 != 0)) {
pCVar10 = pCVar7;
}
iVar8 = CBaseAnimatingOverlay::GetAnimOverlay(this_00,0);
fVar1 = *(float *)(iVar8 + 0x14);
fVar2 = *(float *)(iVar8 + 0xc);
pcVar4 = *(code **)(*engine + 0xbc);
uVar6 = GetSequenceName(pCVar10,*(int *)(iVar8 + 8));
(*pcVar4)(engine,cVar9 + '\n',"FIRE_LAYER: %s %c(c%2.2f, w%2.2f)",uVar6,(double)fVar2,
(double)fVar1);
iVar8 = CBaseAnimatingOverlay::GetAnimOverlay(*(CBaseAnimatingOverlay **)(this + 0x1808),2);
fVar1 = *(float *)(iVar8 + 0x14);
fVar2 = *(float *)(iVar8 + 0xc);
pcVar4 = *(code **)(*engine + 0xbc);
uVar6 = GetSequenceName(pCVar10,*(int *)(iVar8 + 8));
(*pcVar4)(engine,cVar9 + '\v',"FIDGET_LAYER: %s %c(c%2.2f, w%2.2f)",uVar6,(double)fVar2,
(double)fVar1);
}
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.