CGunTarget::Start
0x006d8120 · 210 bytes · __thiscall
_ZN10CGunTarget5StartEv
Decompiled
undefined (1 param)
/* CGunTarget::Start() */
void __thiscall CGunTarget::Start(CGunTarget *this)
{
uint uVar1;
int iVar2;
int *piVar3;
uint *puVar4;
undefined *puVar5;
if (this[0x105] != (CGunTarget)0x2) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
this[0x105] = (CGunTarget)0x2;
}
CBaseEntity::AddFlag((CBaseEntity *)this,0x10000);
piVar3 = (int *)CBaseEntity::GetNextTarget((CBaseEntity *)this);
if (piVar3 == (int *)0x0) {
*(undefined4 *)(this + 0x4bc) = 0xffffffff;
}
else {
puVar4 = (uint *)(**(code **)(*piVar3 + 0xc))(piVar3);
puVar5 = g_pEntityList;
uVar1 = *puVar4;
*(uint *)(this + 0x4bc) = uVar1;
if ((((uVar1 != 0xffffffff) &&
(puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) {
iVar2 = *(int *)(this + 0xfc);
if (iVar2 != *(int *)(this + 0x100)) {
(**(code **)(*(int *)this + 0x214))(this,this + 0x100);
*(int *)(this + 0x100) = iVar2;
}
Next(this);
return;
}
}
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.