CRagdollProp::FadeOutThink
0x007953b0 · 512 bytes · __thiscall
_ZN12CRagdollProp12FadeOutThinkEv
Decompiled
undefined (1 param)
/* CRagdollProp::FadeOutThink() */
void __thiscall CRagdollProp::FadeOutThink(CRagdollProp *this)
{
float fVar1;
undefined4 uVar2;
CBaseEdict *pCVar3;
CRagdollProp CVar4;
int iVar5;
CBaseEntity *pCVar6;
CRagdollProp CVar7;
float fVar8;
undefined1 local_74 [8];
CTakeDamageInfo local_6c [96];
fVar8 = *(float *)(gpGlobals + 0xc) - *(float *)(this + 0x1ec0);
if (0.0 <= fVar8) {
fVar1 = *(float *)(this + 0x1ec4);
if (fVar1 <= fVar8) {
pCVar6 = (CBaseEntity *)UTIL_GetLocalPlayer();
CTakeDamageInfo::CTakeDamageInfo(local_6c,pCVar6,pCVar6,10000.0,0,0);
CBaseEntity::TakeDamage((CBaseEntity *)this,local_6c);
UTIL_Remove((CBaseEntity *)this);
return;
}
if (this[0x121] == (CRagdollProp)0x2) {
CVar4 = this[0x6c];
}
else if (this[0x6c] == (CRagdollProp)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
CVar4 = (CRagdollProp)0x0;
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
CVar4 = this[0x6c];
}
this[0x121] = (CRagdollProp)0x2;
}
else {
this[0x70] = (CRagdollProp)((byte)this[0x70] | 1);
CVar4 = (CRagdollProp)0x1;
this[0x121] = (CRagdollProp)0x2;
}
CVar7 = SUB41((int)((1.0 - fVar8 / fVar1) * 255.0),0);
if (CVar7 != this[0x127]) {
if (CVar4 == (CRagdollProp)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
CVar4 = this[0x6c];
}
}
else {
this[0x70] = (CRagdollProp)((byte)this[0x70] | 1);
}
this[0x127] = CVar7;
}
if (CVar4 == (CRagdollProp)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CRagdollProp)((byte)this[0x70] | 1);
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(this + 0x78) = 0;
*(undefined4 *)(this + 0x74) = uVar2;
}
CBaseEntity::ThinkSet((_func_void *)local_74,(float)this,(char *)FadeOutThink);
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.