CAimTargetManager::OnEntitySpawned
0x0067f590 · 137 bytes · __thiscall
_ZN17CAimTargetManager15OnEntitySpawnedEP11CBaseEntity
Decompiled
undefined (2 params)
/* CAimTargetManager::OnEntitySpawned(CBaseEntity*) */
void __thiscall CAimTargetManager::OnEntitySpawned(CAimTargetManager *this,CBaseEntity *param_1)
{
CBaseEntity CVar1;
int iVar2;
CBaseEntity *local_10;
if (((byte)param_1[0x152] & 1) == 0) {
return;
}
if (*(int *)(this + 0x10) < 1) {
LAB_0067f5d4:
CVar1 = param_1[0x14c];
}
else {
iVar2 = 0;
if (param_1 != (CBaseEntity *)**(int **)(this + 4)) {
do {
iVar2 = iVar2 + 1;
if (iVar2 == *(int *)(this + 0x10)) goto LAB_0067f5d4;
} while (param_1 != (CBaseEntity *)(*(int **)(this + 4))[iVar2]);
if (iVar2 < 0) goto LAB_0067f5d4;
}
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::FastRemove
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)(this + 4),iVar2);
CVar1 = param_1[0x14c];
}
if (((byte)CVar1 & 1) != 0) {
return;
}
local_10 = param_1;
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)(this + 4),
*(int *)(this + 0x10),&local_10);
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.