CFuncTrackTrain::TeleportToPathTrack
0x00b0d9b0 · 368 bytes · __thiscall
_ZN15CFuncTrackTrain19TeleportToPathTrackEP10CPathTrack
Decompiled
undefined (2 params)
/* CFuncTrackTrain::TeleportToPathTrack(CPathTrack*) */
void __thiscall CFuncTrackTrain::TeleportToPathTrack(CFuncTrackTrain *this,CPathTrack *param_1)
{
float fVar1;
float fVar2;
float fVar3;
undefined4 uVar4;
float local_40;
float local_3c;
float local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
fVar1 = *(float *)(param_1 + 0x39c);
fVar2 = *(float *)(param_1 + 0x3a0);
fVar3 = *(float *)(param_1 + 0x3a4);
uVar4 = *(undefined4 *)(this + 0x3a8);
local_40 = fVar1;
local_3c = fVar2;
local_38 = fVar3;
CPathTrack::LookAhead(param_1,(Vector *)&local_40,*(float *)(this + 0x444),0,(CPathTrack **)0x0);
if ((((byte)this[0x148] & 0x10) == 0) &&
(((fVar1 != local_40 || (fVar2 != local_3c)) || (fVar3 != local_38)))) {
CPathTrack::GetOrientation(SUB41(&local_28,0));
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
if (((byte)this[0x148] & 1) != 0) {
local_34 = uVar4;
}
}
else {
local_30 = *(undefined4 *)(this + 0x3ac);
local_2c = *(undefined4 *)(this + 0x3b0);
local_34 = *(undefined4 *)(this + 0x3a8);
}
(**(code **)(*(int *)this + 0x1dc))(this,param_1 + 0x39c,&local_34,0);
CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
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.