L L4D2node

CPropDoorRotating::IsHingeOnLeft

0x007f5b00 · 443 bytes · __thiscall

_ZN17CPropDoorRotating13IsHingeOnLeftEv

Decompiled

undefined (1 param)

/* CPropDoorRotating::IsHingeOnLeft() */

bool __thiscall CPropDoorRotating::IsHingeOnLeft(CPropDoorRotating *this)

{
  uint uVar1;
  uint uVar2;
  float fVar3;
  uint uVar4;
  float fVar5;
  uint uVar6;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  undefined4 local_1c;
  float local_18;
  float local_14;
  
  CCollisionProperty::CollisionAABBToWorldAABB
            ((CCollisionProperty *)(this + 0x194),(Vector *)(this + 0x19c),(Vector *)(this + 0x1a8),
             (Vector *)&local_30,(Vector *)&local_24);
  if (((byte)this[0x14d] & 8) == 0) {
    fVar3 = *(float *)(this + 0x2e0);
    fVar5 = *(float *)(this + 0x2e4);
    local_30 = local_30 - fVar3;
    local_2c = local_2c - fVar5;
  }
  else {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    fVar3 = *(float *)(this + 0x2e0);
    fVar5 = *(float *)(this + 0x2e4);
    local_30 = local_30 - fVar3;
    local_2c = local_2c - fVar5;
    local_28 = local_28 - *(float *)(this + 0x2e8);
    if ((*(uint *)(this + 0x14c) & 0x800) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      fVar3 = *(float *)(this + 0x2e0);
      fVar5 = *(float *)(this + 0x2e4);
    }
  }
  local_1c = 0;
  local_28 = 0.0;
  local_24 = local_24 - fVar3;
  local_20 = local_20 - fVar5;
  uVar1 = -(uint)(local_2c * local_2c + local_30 * local_30 <=
                 local_20 * local_20 + local_24 * local_24);
  uVar6 = (uint)local_20 & uVar1;
  uVar2 = ~uVar1 & (uint)local_2c;
  uVar4 = (uint)local_24 & uVar1;
  uVar1 = ~uVar1 & (uint)local_30;
  (**(code **)(*(int *)this + 0x24c))(this,0,&local_18,0);
  return 0.0 < (float)(uVar2 | uVar6) * local_14 + (float)(uVar1 | uVar4) * local_18;
}

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)