CEnvWeaponfire::Activate
0x008cc080 · 298 bytes · __thiscall
_ZN14CEnvWeaponfire8ActivateEv
Decompiled
undefined (1 param)
/* CEnvWeaponfire::Activate() */
void __thiscall CEnvWeaponfire::Activate(CEnvWeaponfire *this)
{
float fVar1;
int iVar2;
int *piVar3;
undefined4 *puVar4;
longdouble lVar5;
code *pcVar6;
undefined4 uVar7;
undefined4 uVar8;
undefined4 uVar9;
undefined1 local_14 [12];
CBaseEntity::Activate((CBaseEntity *)this);
if (this[0x440] == (CEnvWeaponfire)0x0) {
uVar9 = 0;
uVar8 = 0;
pcVar6 = WeaponfireThink;
uVar7 = 0;
CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)WeaponfireThink);
fVar1 = *(float *)(gpGlobals + 0xc);
lVar5 = (longdouble)RandomFloat(0x3f000000,0x3f800000,pcVar6,uVar7,uVar8,uVar9);
CBaseEntity::SetNextThink((CBaseEntity *)this,(float)lVar5 + fVar1,(char *)0x0);
}
if (*(char **)(this + 0x458) == (char *)0x0) {
return;
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,*(char **)(this + 0x458),
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if ((iVar2 != 0) &&
(piVar3 = (int *)__dynamic_cast(iVar2,&CBaseEntity::typeinfo,&CBaseFilter::typeinfo,0),
piVar3 != (int *)0x0)) {
puVar4 = (undefined4 *)(**(code **)(*piVar3 + 0xc))(piVar3);
*(undefined4 *)(this + 0x494) = *puVar4;
return;
}
*(undefined4 *)(this + 0x494) = 0xffffffff;
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.