CSmokeCloudSystem::FrameUpdatePostEntityThink
0x00908f50 · 421 bytes · __thiscall
_ZN17CSmokeCloudSystem26FrameUpdatePostEntityThinkEv
Decompiled
undefined (1 param)
/* CSmokeCloudSystem::FrameUpdatePostEntityThink() */
void __thiscall CSmokeCloudSystem::FrameUpdatePostEntityThink(CSmokeCloudSystem *this)
{
undefined4 *puVar1;
uint uVar2;
undefined *puVar3;
int iVar4;
int iVar5;
int iVar6;
longdouble lVar7;
int local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
lVar7 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x20) <= (float)lVar7) {
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + 1.0 != *(float *)(this + 0x20)) {
(**(code **)(*(int *)(this + 0x18) + 4))(this + 0x18,this + 0x20);
*(float *)(this + 0x20) = (float)lVar7 + 1.0;
}
if (*(float *)(this + 0x1c) != 1.0) {
(**(code **)(*(int *)(this + 0x18) + 4))(this + 0x18,this + 0x1c);
*(undefined4 *)(this + 0x1c) = 0x3f800000;
}
local_30 = *(int *)(this + 0x30) + -1;
if (-1 < local_30) {
iVar4 = *(int *)(this + 0x30) * 0x14;
do {
puVar1 = (undefined4 *)(*(int *)(this + 0x24) + iVar4 + -0x14);
if (*(float *)(gpGlobals + 0xc) <=
*(float *)(ZombieCoughCloudExpire._28_4_ + 0x2c) + (float)puVar1[3]) {
uVar2 = puVar1[4];
local_20 = 0;
if (((uVar2 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar3 + 8) == uVar2 >> 0xc)) {
local_20 = *(undefined4 *)(puVar3 + 4);
}
local_2c = *puVar1;
local_28 = puVar1[1];
local_24 = puVar1[2];
ForEachPlayer<CauseNearbyCoughing>((CauseNearbyCoughing *)&local_2c);
}
else {
iVar5 = *(int *)(this + 0x30);
iVar6 = (iVar5 - local_30) + -1;
if (0 < iVar6) {
_V_memmove(puVar1,(void *)(iVar4 + *(int *)(this + 0x24)),iVar6 * 0x14);
iVar5 = *(int *)(this + 0x30);
}
*(int *)(this + 0x30) = iVar5 + -1;
}
local_30 = local_30 + -1;
iVar4 = iVar4 + -0x14;
} while (local_30 != -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.