L L4D2node

CTerrorPlayer::UpdateDraggingSomeone

0x009fa7f0 · 647 bytes · __thiscall

_ZN13CTerrorPlayer21UpdateDraggingSomeoneEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::UpdateDraggingSomeone() */

void __thiscall CTerrorPlayer::UpdateDraggingSomeone(CTerrorPlayer *this)

{
  uint uVar1;
  CTerrorPlayer *pCVar2;
  CBaseEdict *this_00;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  int iVar6;
  
  uVar1 = *(uint *)(this + 0x2d64);
  if ((((uVar1 == 0xffffffff) ||
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) ||
     (pCVar2 = *(CTerrorPlayer **)(puVar5 + 4), pCVar2 == (CTerrorPlayer *)0x0)) {
    if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
      iVar6 = 0;
    }
    else {
      iVar6 = *(int *)(g_pEntityList + 4);
    }
    if (((uVar1 == 0xffffffff) ||
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(puVar5 + 4);
    }
    if (iVar6 == iVar4) {
      return;
    }
  }
  else {
    uVar1 = *(uint *)(pCVar2 + 0x2d68);
    if ((((uVar1 != 0xffffffff) &&
         (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (this == *(CTerrorPlayer **)(puVar5 + 4))) {
      cVar3 = (**(code **)(*(int *)pCVar2 + 300))(pCVar2);
      if ((((cVar3 != '\0') &&
           (cVar3 = (**(code **)(*(int *)pCVar2 + 0x7e8))(pCVar2), cVar3 != '\0')) &&
          ((((pCVar2[0x39f1] == (CTerrorPlayer)0x0 &&
             ((pCVar2[0x33dc] == (CTerrorPlayer)0x0 &&
              (cVar3 = (**(code **)(*(int *)this + 300))(this), cVar3 != '\0')))) &&
            (cVar3 = (**(code **)(*(int *)this + 0x7e8))(this), cVar3 == '\0')) &&
           (((iVar6 = CBaseEntity::GetGroundEntity((CBaseEntity *)this), iVar6 != 0 &&
             (this[0x186] != (CTerrorPlayer)0x9)) && (cVar3 = IsAbleToMove(this), cVar3 != '\0')))))
          ) && (cVar3 = (**(code **)(*(int *)this + 0x804))(this), cVar3 == '\0')) {
        if (((*(int *)(SurvivorReviveContinuousFire._28_4_ + 0x30) != 0) &&
            (*(int *)(SurvivorReviveAfterDrag._28_4_ + 0x30) != 0)) &&
           ((*(uint *)(this + 0x1cb0) & 0x61a) == 0)) {
          if (((byte)this[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
          }
          if (((-0.01 < *(float *)(this + 0x2e0)) && (*(float *)(this + 0x2e0) < 0.01)) &&
             ((-0.01 < *(float *)(this + 0x2e4) &&
              (((*(float *)(this + 0x2e4) < 0.01 && (-0.01 < *(float *)(this + 0x2e8))) &&
               (*(float *)(this + 0x2e8) < 0.01)))))) {
            StartReviving(this,pCVar2);
            return;
          }
        }
        if (*(int *)(SurvivorDragContinuousFire._28_4_ + 0x30) == 0) {
          return;
        }
        if (((byte)this[0x1cb1] & 8) != 0) {
          return;
        }
      }
      StopDragging(this);
      return;
    }
    if (((g_pEntityList != (undefined *)0xfffffffc) && (*(int *)(g_pEntityList + 8) == 0)) &&
       (pCVar2 == *(CTerrorPlayer **)(g_pEntityList + 4))) {
      return;
    }
  }
  if (this[0x6c] == (CTerrorPlayer)0x0) {
    this_00 = *(CBaseEdict **)(this + 0x30);
    if (this_00 != (CBaseEdict *)0x0) {
      *(uint *)this_00 = *(uint *)this_00 | 0x101;
      iVar6 = CBaseEdict::GetChangeAccessor(this_00);
      *(undefined2 *)(iVar6 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
  }
  *(undefined4 *)(this + 0x2d64) = 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)