L L4D2node

CTerrorPlayer::UpdateFallingFromLedge

0x009fc070 · 221 bytes · __thiscall

_ZN13CTerrorPlayer22UpdateFallingFromLedgeEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateFallingFromLedge() */

void __thiscall CTerrorPlayer::UpdateFallingFromLedge(CTerrorPlayer *this)

{
  byte *pbVar1;
  int *piVar2;
  int iVar3;
  CBaseEntity *pCVar4;
  CTakeDamageInfo local_6c [96];
  
  if (this[0x39f2] == (CTerrorPlayer)0x0) {
    return;
  }
  iVar3 = CBaseEntity::GetGroundEntity((CBaseEntity *)this);
  if (iVar3 == 0) {
    if (((byte)this[0x14d] & 0x10) != 0) {
      CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
    }
    if (*(float *)(this + 0x27c) <= 0.0 && *(float *)(this + 0x27c) != 0.0) {
      return;
    }
  }
  CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
  pbVar1 = *(byte **)(gpGlobals + 0x58);
  if (((pbVar1 == (byte *)0x0) || ((*pbVar1 & 2) != 0)) ||
     (piVar2 = *(int **)(pbVar1 + 0xc), piVar2 == (int *)0x0)) {
    pCVar4 = (CBaseEntity *)0x0;
  }
  else {
    pCVar4 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2);
  }
  iVar3 = GetRecentPullPlayer(this);
  if (iVar3 != 0) {
    pCVar4 = (CBaseEntity *)GetRecentPullPlayer(this);
  }
  CTakeDamageInfo::CTakeDamageInfo(local_6c,pCVar4,pCVar4,1.0,0x20,0);
  CBaseEntity::TakeDamage((CBaseEntity *)this,local_6c);
  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)