CFuncTrackTrain::SetDirForward
0x00b0ccd0 · 166 bytes · __thiscall
_ZN15CFuncTrackTrain13SetDirForwardEb
Decompiled
undefined (2 params)
/* CFuncTrackTrain::SetDirForward(bool) */
void __thiscall CFuncTrackTrain::SetDirForward(CFuncTrackTrain *this,bool param_1)
{
int iVar1;
undefined4 uVar2;
if (param_1) {
if (*(float *)(this + 0x488) != 1.0) {
if (*(CPathTrack **)(this + 0x440) != (CPathTrack *)0x0) {
iVar1 = CPathTrack::GetPrevious(*(CPathTrack **)(this + 0x440));
if (iVar1 != 0) {
uVar2 = CPathTrack::GetPrevious(*(CPathTrack **)(this + 0x440));
*(undefined4 *)(this + 0x440) = uVar2;
}
}
*(undefined4 *)(this + 0x488) = 0x3f800000;
}
}
else if (*(float *)(this + 0x488) != -1.0) {
if (*(CPathTrack **)(this + 0x440) != (CPathTrack *)0x0) {
iVar1 = CPathTrack::GetNext(*(CPathTrack **)(this + 0x440));
if (iVar1 != 0) {
uVar2 = CPathTrack::GetNext(*(CPathTrack **)(this + 0x440));
*(undefined4 *)(this + 0x440) = uVar2;
}
}
*(undefined4 *)(this + 0x488) = 0xbf800000;
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.