L L4D2node

CTerrorPlayer::SetGrabTarget

0x009a96c0 · 777 bytes · __thiscall

_ZN13CTerrorPlayer13SetGrabTargetERK6VectorS2_S2_S2_S2_P11CBaseEntityP13TerrorNavArea

Decompiled

undefined (8 params)

/* CTerrorPlayer::SetGrabTarget(Vector const&, Vector const&, Vector const&, Vector const&, Vector
   const&, CBaseEntity*, TerrorNavArea*) */

void __thiscall
CTerrorPlayer::SetGrabTarget
          (CTerrorPlayer *this,Vector *param_1,Vector *param_2,Vector *param_3,Vector *param_4,
          Vector *param_5,CBaseEntity *param_6,TerrorNavArea *param_7)

{
  undefined4 uVar1;
  CBaseEntity CVar2;
  CBaseEdict *pCVar3;
  undefined4 *puVar4;
  int iVar5;
  float fVar6;
  
  this[0x39f0] = (CTerrorPlayer)0x1;
  fVar6 = *(float *)param_1;
  if (((fVar6 != *(float *)(this + 0x3a08)) ||
      (*(float *)(param_1 + 4) != *(float *)(this + 0x3a0c))) ||
     (*(float *)(param_1 + 8) != *(float *)(this + 0x3a10))) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        fVar6 = *(float *)param_1;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
      fVar6 = *(float *)param_1;
    }
    *(float *)(this + 0x3a08) = fVar6;
    *(undefined4 *)(this + 0x3a0c) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(this + 0x3a10) = *(undefined4 *)(param_1 + 8);
  }
  *(undefined4 *)(this + 0x3a30) = *(undefined4 *)param_3;
  *(undefined4 *)(this + 0x3a34) = *(undefined4 *)(param_3 + 4);
  *(undefined4 *)(this + 0x3a38) = *(undefined4 *)(param_3 + 8);
  fVar6 = *(float *)param_2;
  if (((fVar6 != *(float *)(this + 0x3a14)) ||
      (*(float *)(param_2 + 4) != *(float *)(this + 0x3a18))) ||
     (*(float *)(param_2 + 8) != *(float *)(this + 0x3a1c))) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        fVar6 = *(float *)param_2;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
      fVar6 = *(float *)param_2;
    }
    *(float *)(this + 0x3a14) = fVar6;
    *(undefined4 *)(this + 0x3a18) = *(undefined4 *)(param_2 + 4);
    *(undefined4 *)(this + 0x3a1c) = *(undefined4 *)(param_2 + 8);
  }
  fVar6 = *(float *)param_4;
  if (((fVar6 != *(float *)(this + 0x3a20)) ||
      (*(float *)(param_4 + 4) != *(float *)(this + 0x3a24))) ||
     (*(float *)(param_4 + 8) != *(float *)(this + 0x3a28))) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar5 + 2) = 0;
        fVar6 = *(float *)param_4;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
      fVar6 = *(float *)param_4;
    }
    *(float *)(this + 0x3a20) = fVar6;
    *(undefined4 *)(this + 0x3a24) = *(undefined4 *)(param_4 + 4);
    *(undefined4 *)(this + 0x3a28) = *(undefined4 *)(param_4 + 8);
  }
  *(undefined4 *)(this + 0x3a3c) = *(undefined4 *)param_5;
  *(undefined4 *)(this + 0x3a40) = *(undefined4 *)(param_5 + 4);
  *(undefined4 *)(this + 0x3a44) = *(undefined4 *)(param_5 + 8);
  if (param_6 == (CBaseEntity *)0x0) {
    *(undefined4 *)(this + 0x3a48) = 0xffffffff;
    CVar2 = CRam0000014d;
  }
  else {
    puVar4 = (undefined4 *)(**(code **)(*(int *)param_6 + 0xc))(param_6);
    *(undefined4 *)(this + 0x3a48) = *puVar4;
    CVar2 = param_6[0x14d];
  }
  if (((byte)CVar2 & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_6);
  }
  *(undefined4 *)(this + 0x3a4c) = *(undefined4 *)(param_6 + 0x2e0);
  *(undefined4 *)(this + 0x3a50) = *(undefined4 *)(param_6 + 0x2e4);
  *(undefined4 *)(this + 0x3a54) = *(undefined4 *)(param_6 + 0x2e8);
  if (((byte)param_6[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_6);
  }
  *(undefined4 *)(this + 0x3a58) = *(undefined4 *)(param_6 + 0x37c);
  *(undefined4 *)(this + 0x3a5c) = *(undefined4 *)(param_6 + 0x380);
  uVar1 = *(undefined4 *)(param_6 + 900);
  *(TerrorNavArea **)(this + 0x3a64) = param_7;
  *(undefined4 *)(this + 0x3a60) = uVar1;
  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)