L L4D2node

CPropDoorRotating::ComputeDoorExtent

0x007f5ea0 · 532 bytes · __thiscall

_ZN17CPropDoorRotating17ComputeDoorExtentEP6Extentj

Decompiled

undefined (3 params)

/* CPropDoorRotating::ComputeDoorExtent(Extent*, unsigned int) */

void __thiscall
CPropDoorRotating::ComputeDoorExtent(CPropDoorRotating *this,Extent *param_1,uint param_2)

{
  Extent *pEVar1;
  float fVar2;
  int iVar3;
  Vector local_34 [12];
  float local_28 [6];
  
  if (param_1 != (Extent *)0x0) {
    if ((param_2 & 2) == 0) {
      if ((param_2 & 1) != 0) {
        UTIL_ComputeAABBForBounds
                  ((Vector *)(this + 0x1798),(Vector *)(this + 0x17a4),(Vector *)(this + 0x17b0),
                   (Vector *)(this + 0x17bc),(Vector *)param_1,(Vector *)(param_1 + 0xc));
      }
    }
    else {
      pEVar1 = param_1 + 0xc;
      CalculateDoorVolume(this,*(undefined4 *)(this + 0x1768),*(undefined4 *)(this + 0x176c),
                          *(undefined4 *)(this + 6000),*(undefined4 *)(this + 0x1768),
                          *(undefined4 *)(this + 0x176c),*(undefined4 *)(this + 6000),param_1,pEVar1
                         );
      if ((param_2 & 1) != 0) {
        UTIL_ComputeAABBForBounds
                  ((Vector *)(this + 0x1798),(Vector *)(this + 0x17a4),(Vector *)(this + 0x17b0),
                   (Vector *)(this + 0x17bc),local_34,(Vector *)local_28);
        iVar3 = 0;
        do {
          fVar2 = *(float *)(local_34 + iVar3 * 4);
          if (*(float *)(param_1 + iVar3 * 4) <= fVar2) {
            if (*(float *)(pEVar1 + iVar3 * 4) <= fVar2 && fVar2 != *(float *)(pEVar1 + iVar3 * 4))
            {
              *(float *)(pEVar1 + iVar3 * 4) = fVar2;
            }
          }
          else {
            *(float *)(param_1 + iVar3 * 4) = fVar2;
          }
          iVar3 = iVar3 + 1;
        } while (iVar3 != 3);
        iVar3 = 0;
        if (*(float *)param_1 <= local_28[0]) goto LAB_007f6041;
        do {
          *(float *)(param_1 + iVar3 * 4) = local_28[0];
          while( true ) {
            iVar3 = iVar3 + 1;
            if (iVar3 == 3) goto LAB_007f5ecf;
            local_28[0] = local_28[iVar3];
            if (local_28[0] < *(float *)(param_1 + iVar3 * 4)) break;
LAB_007f6041:
            if (*(float *)(pEVar1 + iVar3 * 4) <= local_28[0] &&
                local_28[0] != *(float *)(pEVar1 + iVar3 * 4)) {
              *(float *)(pEVar1 + iVar3 * 4) = local_28[0];
            }
          }
        } while( true );
      }
    }
LAB_007f5ecf:
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    *(float *)param_1 = *(float *)param_1 + *(float *)(this + 0x2e0);
    *(float *)(param_1 + 4) = *(float *)(param_1 + 4) + *(float *)(this + 0x2e4);
    *(float *)(param_1 + 8) = *(float *)(param_1 + 8) + *(float *)(this + 0x2e8);
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    *(float *)(param_1 + 0xc) = *(float *)(param_1 + 0xc) + *(float *)(this + 0x2e0);
    *(float *)(param_1 + 0x10) = *(float *)(param_1 + 0x10) + *(float *)(this + 0x2e4);
    *(float *)(param_1 + 0x14) = *(float *)(param_1 + 0x14) + *(float *)(this + 0x2e8);
  }
  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)