L L4D2node

CTerrorPlayer::UpdateTrackingWhoPushedMeOffALedge

0x009fbe80 · 473 bytes · __thiscall

_ZN13CTerrorPlayer34UpdateTrackingWhoPushedMeOffALedgeEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateTrackingWhoPushedMeOffALedge() */

void __thiscall CTerrorPlayer::UpdateTrackingWhoPushedMeOffALedge(CTerrorPlayer *this)

{
  float fVar1;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  longdouble lVar5;
  
  if ((((this[0x39f1] != (CTerrorPlayer)0x0) &&
       (uVar2 = *(uint *)(this + 0x31e0), uVar2 != 0xffffffff)) &&
      (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar4 + 8) == uVar2 >> 0xc && (*(int *)(puVar4 + 4) != 0)))) {
LAB_009fbff3:
    *(undefined4 *)(this + 0x31e0) = 0xffffffff;
    return;
  }
  iVar3 = CBaseEntity::GetGroundEntity((CBaseEntity *)this);
  if (((iVar3 == 0) &&
      ((uVar2 = *(uint *)(this + 0x31e0), uVar2 != 0xffffffff &&
       (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)))) &&
     ((*(uint *)(puVar4 + 8) == uVar2 >> 0xc && (*(int *)(puVar4 + 4) != 0)))) {
    fVar1 = *(float *)(this + 0x31dc);
    lVar5 = (longdouble)CountdownTimer::Now();
    if (fVar1 - (float)lVar5 < 2.0) {
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + 2.0 != *(float *)(this + 0x31dc)) {
        (**(code **)(*(int *)(this + 0x31d4) + 4))(this + 0x31d4,this + 0x31dc);
        *(float *)(this + 0x31dc) = (float)lVar5 + 2.0;
      }
      if (*(float *)(this + 0x31d8) != 2.0) {
        (**(code **)(*(int *)(this + 0x31d4) + 4))(this + 0x31d4,this + 0x31d8);
        *(undefined4 *)(this + 0x31d8) = 0x40000000;
      }
    }
  }
  else {
    iVar3 = CBaseEntity::GetGroundEntity((CBaseEntity *)this);
    if (((((iVar3 != 0) && (uVar2 = *(uint *)(this + 0x31e0), uVar2 != 0xffffffff)) &&
         (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        ((*(uint *)(puVar4 + 8) == uVar2 >> 0xc && (*(int *)(puVar4 + 4) != 0)))) &&
       (lVar5 = (longdouble)CountdownTimer::Now(), *(float *)(this + 0x31dc) <= (float)lVar5))
    goto LAB_009fbff3;
  }
  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)