CEnvSpark::SparkThink
0x0068afc0 · 530 bytes · __thiscall
_ZN9CEnvSpark10SparkThinkEv
Decompiled
undefined (1 param)
/* CEnvSpark::SparkThink() */
void __thiscall CEnvSpark::SparkThink(CEnvSpark *this)
{
float fVar1;
uint uVar2;
int iVar3;
int iVar4;
code *pcVar5;
undefined4 uVar6;
Vector *pVVar7;
longdouble lVar8;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined **local_3c [11];
fVar1 = *(float *)(gpGlobals + 0xc);
lVar8 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0,*(undefined4 *)(this + 0x440))
;
CBaseEntity::SetNextThink((CBaseEntity *)this,fVar1 + 0.1 + (float)lVar8,(char *)0x0);
local_48 = vec3_origin;
local_44 = DAT_01053d4c;
local_40 = DAT_01053d50;
uVar2 = *(uint *)(this + 0x148);
if ((uVar2 & 0x200) != 0) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
AngleVectors((QAngle *)(this + 0x37c),(Vector *)&local_48);
uVar2 = *(uint *)(this + 0x148);
}
iVar3 = *(int *)(this + 0x44c);
iVar4 = *(int *)(this + 0x448);
pVVar7 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
DoSpark((CBaseEntity *)this,pVVar7,iVar4,iVar3,(uVar2 & 0x100) == 0,(Vector *)&local_48);
COutputEvent::FireOutput
((COutputEvent *)(this + 0x450),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
if (((byte)this[0x148] & 0x80) != 0) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CPVSFilter_00c09bc8;
/* try { // try from 0068b12c to 0068b130 has its CatchHandler @ 0068b1f6 */
CRecipientFilter::AddRecipientsByPVS((CRecipientFilter *)local_3c,(Vector *)(this + 0x2e0));
pcVar5 = *(code **)(*(int *)te + 0x5c);
uVar6 = *(undefined4 *)(this + 0x444);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
/* try { // try from 0068b185 to 0068b1b7 has its CatchHandler @ 0068b1dd */
(*pcVar5)(te,(CRecipientFilter *)local_3c,0,(Vector *)(this + 0x2e0),uVar6,0x3e4ccccd,0x3fc00000
,0x19);
local_3c[0] = &PTR__CPVSFilter_00c09bc8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
}
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.