L L4D2node

CFuncTrackTrain::DeadEnd

0x00b09180 · 334 bytes · __thiscall

_ZN15CFuncTrackTrain7DeadEndEv

Decompiled

undefined (1 param)

/* CFuncTrackTrain::DeadEnd() */

void __thiscall CFuncTrackTrain::DeadEnd(CFuncTrackTrain *this)

{
  undefined4 uVar1;
  CPathTrack *pCVar2;
  CBaseEntity *this_00;
  undefined4 local_20 [3];
  undefined4 local_14;
  undefined4 local_10;
  
  pCVar2 = *(CPathTrack **)(this + 0x440);
  uVar1 = CBaseEntity::GetDebugName((CBaseEntity *)this);
  DevMsg(2,"TRAIN(%s): Dead end ",uVar1);
  if (pCVar2 == (CPathTrack *)0x0) {
    CBaseEntity::SetLocalVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
    CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
    DevMsg(2,&DAT_00cff71e,uVar1);
    return;
  }
  if (0.0 < *(float *)(this + 0x478) || *(float *)(this + 0x478) == 0.0) {
    do {
      this_00 = (CBaseEntity *)pCVar2;
      pCVar2 = (CPathTrack *)CPathTrack::GetNext((CPathTrack *)this_00);
      pCVar2 = (CPathTrack *)CPathTrack::ValidPath(pCVar2,1);
    } while (pCVar2 != (CPathTrack *)0x0);
  }
  else {
    do {
      this_00 = (CBaseEntity *)pCVar2;
      pCVar2 = (CPathTrack *)CPathTrack::GetPrevious((CPathTrack *)this_00);
      pCVar2 = (CPathTrack *)CPathTrack::ValidPath(pCVar2,1);
    } while (pCVar2 != (CPathTrack *)0x0);
  }
  CBaseEntity::SetLocalVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
  CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
  uVar1 = CBaseEntity::GetDebugName(this_00);
  DevMsg(2,"at %s\n",uVar1);
  local_20[0] = 0;
  local_14 = 0xffffffff;
  local_10 = 0;
  (**(code **)(*(int *)this_00 + 0xb4))(this_00,"InPass",this,this,local_20,0);
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)