CGibShooter::ShootThink
0x00670680 · 710 bytes · __thiscall
_ZN11CGibShooter10ShootThinkEv
Decompiled
undefined (1 param)
/* CGibShooter::ShootThink() */
void __thiscall CGibShooter::ShootThink(CGibShooter *this)
{
float fVar1;
float fVar2;
int iVar3;
longdouble lVar4;
code *pcVar5;
undefined1 local_44 [8];
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
CBaseEntity::SetNextThink
((CBaseEntity *)this,*(float *)(this + 0x474) + *(float *)(gpGlobals + 0xc),(char *)0x0)
;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
AngleVectors((QAngle *)(this + 0x37c),(Vector *)&local_30,(Vector *)&local_24,(Vector *)&local_18)
;
local_3c = local_30;
local_38 = local_2c;
local_34 = local_28;
fVar1 = *(float *)(this + 0x464);
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
fVar2 = (float)lVar4;
local_38 = local_20 * fVar1 * fVar2 + local_38;
local_34 = local_1c * fVar1 * fVar2 + local_34;
local_3c = fVar1 * local_24 * fVar2 + local_3c;
fVar1 = *(float *)(this + 0x464);
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
fVar2 = (float)lVar4;
local_38 = local_2c * fVar1 * fVar2 + local_38;
local_34 = local_28 * fVar1 * fVar2 + local_34;
local_3c = fVar1 * local_30 * fVar2 + local_3c;
fVar1 = *(float *)(this + 0x464);
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
fVar2 = (float)lVar4;
local_38 = local_14 * fVar1 * fVar2 + local_38;
local_34 = local_10 * fVar1 * fVar2 + local_34;
local_3c = fVar1 * local_18 * fVar2 + local_3c;
VectorNormalize((Vector *)&local_3c);
SpawnGib(this,(Vector *)&local_3c,*(float *)(this + 0x450));
iVar3 = *(int *)(this + 0x440);
*(int *)(this + 0x440) = iVar3 + -1;
if (0 < iVar3 + -1) {
return;
}
if (((byte)this[0x148] & 1) == 0) {
pcVar5 = CBaseEntity::SUB_Remove;
}
else {
*(undefined4 *)(this + 0x440) = *(undefined4 *)(this + 0x444);
pcVar5 = (code *)0x0;
}
CBaseEntity::ThinkSet((_func_void *)local_44,(float)this,(char *)pcVar5);
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.