FindPickerEntity
0x007b1b40 · 186 bytes · __cdecl
_Z16FindPickerEntityP11CBasePlayer
Decompiled
undefined (1 param)
/* FindPickerEntity(CBasePlayer*) */
int FindPickerEntity(CBasePlayer *param_1)
{
int iVar1;
code *pcVar2;
int *piVar3;
int iVar4;
undefined4 *puVar5;
Vector local_40 [12];
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
piVar3 = mdlcache;
puVar5 = (undefined4 *)&stack0xffffff94;
(**(code **)(*mdlcache + 0x68))();
/* try { // try from 007b1b65 to 007b1b69 has its CatchHandler @ 007b1bfe */
iVar4 = FindEntityForward(param_1,true);
if (iVar4 == 0) {
/* try { // try from 007b1ba2 to 007b1bf8 has its CatchHandler @ 007b1bfe */
CBasePlayer::EyeVectors(param_1,local_40,(Vector *)0x0,(Vector *)0x0);
(**(code **)(*(int *)param_1 + 0x234))();
puVar5 = (undefined4 *)&stack0xffffff90;
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
iVar4 = CGlobalEntityList::FindEntityNearestFacing
((CGlobalEntityList *)gEntList,(Vector *)&local_34,local_40,0.95);
}
iVar1 = *piVar3;
*puVar5 = piVar3;
pcVar2 = *(code **)(iVar1 + 0x6c);
puVar5[-1] = 0x7b1b79;
(*pcVar2)();
return iVar4;
}
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.