CFuncTrackAuto::TriggerTrackChange
0x00b0e470 · 336 bytes · __thiscall
_ZN14CFuncTrackAuto18TriggerTrackChangeER11inputdata_t
Decompiled
undefined (2 params)
/* CFuncTrackAuto::TriggerTrackChange(inputdata_t&) */
void __thiscall CFuncTrackAuto::TriggerTrackChange(CFuncTrackAuto *this,inputdata_t *param_1)
{
CBaseEntity *this_00;
char cVar1;
int iVar2;
code *UNRECOVERED_JUMPTABLE;
CPathTrack *this_01;
if (*(int *)(this + 0x50c) != 0) {
if (*(int *)(this + 0x440) == 0) {
this_01 = *(CPathTrack **)(this + 0x4ec);
}
else {
this_01 = (CPathTrack *)0x0;
if (*(int *)(this + 0x440) == 1) {
this_01 = *(CPathTrack **)(this + 0x4f0);
}
}
this_00 = *(CBaseEntity **)param_1;
if ((this_00 == (CBaseEntity *)0x0) ||
((*(char **)(this_00 + 0x7c) != "func_tracktrain" &&
(cVar1 = CBaseEntity::ClassMatchesComplex(this_00,"func_tracktrain"), cVar1 == '\0')))) {
if ((((this_01 != (CPathTrack *)0x0) && (iVar2 = CPathTrack::GetNext(this_01), iVar2 != 0)) &&
(iVar2 != *(int *)(*(int *)(this + 0x4f4) + 0x440))) &&
(iVar2 = CBaseEntity::ShouldToggle((CBaseEntity *)this,3,*(undefined4 *)(this + 0x508)),
iVar2 != 0)) {
if (*(int *)(this + 0x508) == 0) {
*(undefined4 *)(this + 0x508) = 1;
}
else {
*(undefined4 *)(this + 0x508) = 0;
}
}
/* WARNING: Could not recover jumptable at 0x00b0e57a. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x33c))();
return;
}
iVar2 = CFuncTrackChange::EvaluateTrain((CFuncTrackChange *)this,this_01);
*(int *)(this + 0x504) = iVar2;
if ((iVar2 == 2) && (*(int *)(this + 0x440) != *(int *)(this + 0x508))) {
*(undefined4 *)(this + 0x50c) = 0;
if (*(int *)(this + 0x440) == 0) {
UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x330);
}
else {
UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x32c);
}
/* WARNING: Could not recover jumptable at 0x00b0e5ad. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
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.