CRagdollProp::DrawDebugTextOverlays
0x0079b480 · 385 bytes · __thiscall
_ZN12CRagdollProp21DrawDebugTextOverlaysEv
Decompiled
undefined (1 param)
/* CRagdollProp::DrawDebugTextOverlays() */
int __thiscall CRagdollProp::DrawDebugTextOverlays(CRagdollProp *this)
{
int *piVar1;
undefined4 uVar2;
CRagdollProp *pCVar3;
int iVar4;
int in_GS_OFFSET;
longdouble lVar5;
float fVar6;
double dVar7;
int local_240;
double local_23c;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_240 = CBaseAnimating::DrawDebugTextOverlays((CBaseAnimating *)this);
if ((((byte)this[0x110] & 1) != 0) && (*(int *)(this + 0x13f8) != 0)) {
if (*(int *)(this + 0x13f8) < 1) {
dVar7 = 0.0;
fVar6 = 0.0;
local_23c = 0.0;
}
else {
pCVar3 = this + 0x1410;
iVar4 = 0;
fVar6 = 0.0;
do {
piVar1 = *(int **)pCVar3;
if (piVar1 != (int *)0x0) {
lVar5 = (longdouble)(**(code **)(*piVar1 + 0x78))(piVar1);
fVar6 = fVar6 + (float)lVar5;
}
iVar4 = iVar4 + 1;
pCVar3 = pCVar3 + 0x54;
} while (iVar4 < *(int *)(this + 0x13f8));
local_23c = (double)(fVar6 * 2.2);
dVar7 = (double)fVar6;
}
uVar2 = GetMassEquivalent(fVar6);
V_snprintf(local_220,0x200,"Mass: %.2f kg / %.2f lb (%s)",dVar7,local_23c,uVar2);
CBaseEntity::EntityText((CBaseEntity *)this,local_240,local_220,0.0,0xff,0xff,0xff,0xff);
local_240 = local_240 + 1;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return local_240;
}
/* 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.