CFuncTrackChange::Find
0x00b096b0 · 688 bytes · __thiscall
_ZN16CFuncTrackChange4FindEv
Decompiled
undefined (1 param)
/* CFuncTrackChange::Find() */
void __thiscall CFuncTrackChange::Find(CFuncTrackChange *this)
{
char *pcVar1;
int iVar2;
undefined4 *puVar3;
undefined4 uVar4;
char *pcVar5;
undefined1 local_24 [12];
undefined4 local_18;
undefined4 local_14;
undefined4 local_10;
pcVar5 = "";
pcVar1 = *(char **)(this + 0x4f8);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (iVar2 == 0) {
if (*(char **)(this + 0x4f8) != (char *)0x0) {
pcVar5 = *(char **)(this + 0x4f8);
}
Warning("Can\'t find top track for track change! %s\n",pcVar5);
return;
}
*(int *)(this + 0x4ec) = iVar2;
pcVar1 = *(char **)(this + 0x4fc);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (iVar2 != 0) {
*(int *)(this + 0x4f0) = iVar2;
pcVar1 = *(char **)(this + 0x500);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
pcVar1 = *(char **)(this + 0x500);
if (iVar2 != 0) {
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
*(int *)(this + 0x4f4) = iVar2;
if (iVar2 != 0) {
puVar3 = (undefined4 *)(**(code **)(*(int *)this + 0x288))(this);
local_18 = *puVar3;
local_14 = puVar3[1];
local_10 = puVar3[2];
uVar4 = CPathTrack::Nearest(*(CPathTrack **)(this + 0x4f0),(Vector *)&local_18);
*(undefined4 *)(this + 0x4f0) = uVar4;
uVar4 = CPathTrack::Nearest(*(CPathTrack **)(this + 0x4ec),(Vector *)&local_18);
*(undefined4 *)(this + 0x4ec) = uVar4;
(**(code **)(*(int *)this + 0x33c))(this,*(undefined4 *)(this + 0x440));
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x0);
return;
}
if (*(char **)(this + 0x500) != (char *)0x0) {
pcVar5 = *(char **)(this + 0x500);
}
Warning("Can\'t find train for track change! %s\n",pcVar5);
return;
}
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
Warning("Can\'t find train for track change! %s\n",pcVar1);
if (*(char **)(this + 0x500) != (char *)0x0) {
pcVar5 = *(char **)(this + 0x500);
}
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar5,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
return;
}
if (*(char **)(this + 0x4fc) != (char *)0x0) {
pcVar5 = *(char **)(this + 0x4fc);
}
Warning("Can\'t find bottom track for track change! %s\n",pcVar5);
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.