CBaseGrenade::Smoke
0x004124b0 · 446 bytes · __thiscall
_ZN12CBaseGrenade5SmokeEv
Decompiled
undefined (1 param)
/* CBaseGrenade::Smoke() */
void __thiscall CBaseGrenade::Smoke(CBaseGrenade *this)
{
uint uVar1;
undefined1 local_64 [16];
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
undefined **local_3c;
float local_38;
float local_34;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_54 = *(float *)(this + 0x2e0);
local_50 = *(float *)(this + 0x2e4);
local_4c = *(float *)(this + 0x2e8);
uVar1 = (**(code **)*enginetrace)(enginetrace,(Vector *)&local_54,0x4030,0);
if ((uVar1 & 0x4030) == 0) {
CRecipientFilter::CRecipientFilter((CRecipientFilter *)&local_3c);
local_3c = &PTR__CPVSFilter_00c09bc8;
/* try { // try from 0041252b to 0041252f has its CatchHandler @ 0041268e */
CRecipientFilter::AddRecipientsByPVS((CRecipientFilter *)&local_3c,(Vector *)&local_54);
/* try { // try from 0041257d to 00412582 has its CatchHandler @ 00412675 */
(**(code **)(*(int *)te + 0x80))
(te,(CRecipientFilter *)&local_3c,0,(Vector *)&local_54,g_sModelIndexSmoke,
*(float *)(this + 0x1a44) * 0.03,0x18);
local_3c = &PTR__CPVSFilter_00c09bc8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)&local_3c);
}
else {
local_3c = (undefined **)(local_54 + 64.0);
local_48 = local_54 - 64.0;
local_44 = local_50 - 64.0;
local_38 = local_50 + 64.0;
local_40 = local_4c - 64.0;
local_34 = local_4c + 64.0;
UTIL_Bubbles((Vector *)&local_48,(Vector *)&local_3c,100);
}
CBaseEntity::ThinkSet((_func_void *)local_64,(float)this,(char *)CBaseEntity::SUB_Remove);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
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.