CFuncTrainControls::Find
0x00b0dca0 · 232 bytes · __thiscall
_ZN18CFuncTrainControls4FindEv
Decompiled
undefined (1 param)
/* CFuncTrainControls::Find() */
void __thiscall CFuncTrainControls::Find(CFuncTrainControls *this)
{
char cVar1;
char *pcVar2;
undefined1 *puVar3;
CBaseEntity *this_00;
undefined1 local_24 [20];
this_00 = (CBaseEntity *)0x0;
do {
pcVar2 = *(char **)(this + 0xf8);
if (pcVar2 == (char *)0x0) {
pcVar2 = "";
}
this_00 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,this_00,pcVar2,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (this_00 == (CBaseEntity *)0x0) {
puVar3 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0xf8) != (undefined1 *)0x0) {
puVar3 = *(undefined1 **)(this + 0xf8);
}
Msg("No train %s\n",puVar3);
return;
}
if (*(char **)(this_00 + 0x7c) == "func_tracktrain") break;
cVar1 = CBaseEntity::ClassMatchesComplex(this_00,"func_tracktrain");
} while (cVar1 == '\0');
CFuncTrackTrain::SetControls((CFuncTrackTrain *)this_00,(CBaseEntity *)this);
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(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.