L L4D2node

CFuncTrackAuto::Use

0x00b0e5e0 · 333 bytes · __cdecl

_ZN14CFuncTrackAuto3UseEP11CBaseEntityS1_8USE_TYPEf

Decompiled

undefined (4 params)

/* CFuncTrackAuto::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */

void CFuncTrackAuto::Use(CBaseEntity *param_1,CBaseEntity *param_2,undefined4 param_3,
                        undefined4 param_4)

{
  char cVar1;
  int iVar2;
  code *UNRECOVERED_JUMPTABLE;
  CPathTrack *this;
  
  if (*(int *)(param_1 + 0x50c) != 0) {
    if (*(int *)(param_1 + 0x440) == 0) {
      this = *(CPathTrack **)(param_1 + 0x4ec);
    }
    else {
      this = (CPathTrack *)0x0;
      if (*(int *)(param_1 + 0x440) == 1) {
        this = *(CPathTrack **)(param_1 + 0x4f0);
      }
    }
    if ((*(char **)(param_2 + 0x7c) != "func_tracktrain") &&
       (cVar1 = CBaseEntity::ClassMatchesComplex(param_2,"func_tracktrain"), cVar1 == '\0')) {
      if ((this != (CPathTrack *)0x0) &&
         (((iVar2 = CPathTrack::GetNext(this), iVar2 != 0 &&
           (iVar2 != *(int *)(*(int *)(param_1 + 0x4f4) + 0x440))) &&
          (iVar2 = CBaseEntity::ShouldToggle(param_1,param_4,*(undefined4 *)(param_1 + 0x508)),
          iVar2 != 0)))) {
        if (*(int *)(param_1 + 0x508) == 0) {
          *(undefined4 *)(param_1 + 0x508) = 1;
        }
        else {
          *(undefined4 *)(param_1 + 0x508) = 0;
        }
      }
                    /* WARNING: Could not recover jumptable at 0x00b0e6eb. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*(int *)param_1 + 0x33c))();
      return;
    }
    iVar2 = CFuncTrackChange::EvaluateTrain((CFuncTrackChange *)param_1,this);
    *(int *)(param_1 + 0x504) = iVar2;
    if ((iVar2 == 2) && (*(int *)(param_1 + 0x440) != *(int *)(param_1 + 0x508))) {
      *(undefined4 *)(param_1 + 0x50c) = 0;
      if (*(int *)(param_1 + 0x440) == 0) {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)param_1 + 0x330);
      }
      else {
        UNRECOVERED_JUMPTABLE = *(code **)(*(int *)param_1 + 0x32c);
      }
                    /* WARNING: Could not recover jumptable at 0x00b0e71e. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*UNRECOVERED_JUMPTABLE)();
      return;
    }
  }
  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)