L L4D2node

CBaseEntity::SetAbsAngles

0x0060bf80 · 770 bytes · __thiscall

_ZN11CBaseEntity12SetAbsAnglesERK6QAngle

Decompiled

undefined (2 params)

/* CBaseEntity::SetAbsAngles(QAngle const&) */

void __thiscall CBaseEntity::SetAbsAngles(CBaseEntity *this,QAngle *param_1)

{
  matrix3x4_t *pmVar1;
  float fVar2;
  uint uVar3;
  CBaseEdict *pCVar4;
  CBaseEntity *this_00;
  int iVar5;
  undefined *puVar6;
  float local_88;
  float local_84;
  float local_80;
  matrix3x4_t local_7c [48];
  matrix3x4_t local_4c [60];
  
  CalcAbsolutePosition(this);
  if (((*(float *)param_1 == *(float *)(this + 0x37c)) &&
      (*(float *)(param_1 + 4) == *(float *)(this + 0x380))) &&
     (*(float *)(param_1 + 8) == *(float *)(this + 900))) {
    return;
  }
  pmVar1 = (matrix3x4_t *)(this + 0x28c);
  InvalidatePhysicsRecursive(this,2);
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) & 0xfffff7ff;
  *(undefined4 *)(this + 0x37c) = *(undefined4 *)param_1;
  *(undefined4 *)(this + 0x380) = *(undefined4 *)(param_1 + 4);
  *(undefined4 *)(this + 900) = *(undefined4 *)(param_1 + 8);
  AngleMatrix(param_1,pmVar1);
  MatrixSetColumn((Vector *)(this + 0x2e0),3,pmVar1);
  uVar3 = *(uint *)(this + 0x188);
  if (((uVar3 == 0xffffffff) ||
      (puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
     ((*(uint *)(puVar6 + 8) != uVar3 >> 0xc ||
      (this_00 = *(CBaseEntity **)(puVar6 + 4), this_00 == (CBaseEntity *)0x0)))) {
    local_88 = *(float *)param_1;
    local_84 = *(float *)(param_1 + 4);
    local_80 = *(float *)(param_1 + 8);
  }
  else {
    if (((byte)this_00[0x14d] & 8) != 0) {
      CalcAbsolutePosition(this_00);
    }
    if (((*(float *)(this_00 + 0x37c) == *(float *)(this + 0x37c)) &&
        (*(float *)(this_00 + 0x380) == *(float *)(this + 0x380))) &&
       (*(float *)(this_00 + 900) == *(float *)(this + 900))) {
      local_84 = 0.0;
      local_88 = 0.0;
      local_80 = 0.0;
    }
    else {
      if (((byte)this_00[0x14d] & 8) != 0) {
        CalcAbsolutePosition(this_00);
      }
      MatrixInvert((matrix3x4_t *)(this_00 + 0x28c),local_7c);
      ConcatTransforms(local_7c,pmVar1,local_4c);
      MatrixAngles(local_4c,&local_88);
    }
  }
  if (local_88 == *(float *)(this + 0x3a8)) {
    if ((local_84 == *(float *)(this + 0x3ac)) && (local_80 == *(float *)(this + 0x3b0))) {
      return;
    }
    if ((local_84 == *(float *)(this + 0x3ac)) && (local_80 == *(float *)(this + 0x3b0)))
    goto LAB_0060c0d2;
  }
  if (this[0x6c] == (CBaseEntity)0x0) {
    pCVar4 = *(CBaseEdict **)(this + 0x30);
    if (pCVar4 != (CBaseEdict *)0x0) {
      *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
      iVar5 = CBaseEdict::GetChangeAccessor(pCVar4);
      *(undefined2 *)(iVar5 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
  }
  *(float *)(this + 0x3a8) = local_88;
  *(float *)(this + 0x3ac) = local_84;
  *(float *)(this + 0x3b0) = local_80;
LAB_0060c0d2:
  fVar2 = *(float *)(gpGlobals + 0xc);
  if (fVar2 != *(float *)(this + 0x94)) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar4 = *(CBaseEdict **)(this + 0x30);
      if (pCVar4 != (CBaseEdict *)0x0) {
        *(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar4);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x94) = fVar2;
  }
  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)