L L4D2node

CCollisionProperty::ComputeSurroundingBox

0x0042afe0 · 404 bytes · __thiscall

_ZN18CCollisionProperty21ComputeSurroundingBoxEP6VectorS1_

Decompiled

undefined (3 params)

/* CCollisionProperty::ComputeSurroundingBox(Vector*, Vector*) */

void __thiscall
CCollisionProperty::ComputeSurroundingBox(CCollisionProperty *this,Vector *param_1,Vector *param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  code *UNRECOVERED_JUMPTABLE;
  float *pfVar4;
  
  iVar2 = (**(code **)(*(int *)this + 0x2c))(this);
  if (iVar2 != 5) {
    switch(this[0x2a]) {
    case (CCollisionProperty)0x0:
      ComputeOBBBounds(this,param_1,param_2);
      return;
    case (CCollisionProperty)0x1:
      iVar2 = (**(code **)(*(int *)this + 0x2c))(this);
      ComputeCollisionSurroundingBox(this,iVar2 == 6,param_1,param_2);
      break;
    case (CCollisionProperty)0x2:
      ComputeHitboxSurroundingBox(this,param_1,param_2);
      return;
    case (CCollisionProperty)0x3:
      pfVar4 = (float *)(**(code **)(*(int *)this + 0x20))(this);
      *(float *)param_1 = *(float *)(this + 0x2c) + *pfVar4;
      *(float *)(param_1 + 4) = *(float *)(this + 0x30) + pfVar4[1];
      *(float *)(param_1 + 8) = *(float *)(this + 0x34) + pfVar4[2];
      pfVar4 = (float *)(**(code **)(*(int *)this + 0x20))(this);
      *(float *)param_2 = *(float *)(this + 0x38) + *pfVar4;
      *(float *)(param_2 + 4) = *(float *)(this + 0x3c) + pfVar4[1];
      *(float *)(param_2 + 8) = *(float *)(this + 0x40) + pfVar4[2];
      break;
    case (CCollisionProperty)0x4:
      goto switchD_0042b009_caseD_4;
    case (CCollisionProperty)0x5:
      ComputeRotationExpandedBounds(this,param_1,param_2);
      return;
    case (CCollisionProperty)0x6:
      UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0xc);
      goto LAB_0042b06e;
    case (CCollisionProperty)0x7:
      ComputeRotationExpandedSequenceBounds(this,param_1,param_2);
      return;
    }
    return;
  }
  if (this[0x2a] != (CCollisionProperty)0x4) {
    puVar3 = (undefined4 *)(**(code **)(*(int *)this + 0x20))(this);
    uVar1 = *puVar3;
    *(undefined4 *)param_1 = uVar1;
    *(undefined4 *)(param_1 + 4) = puVar3[1];
    *(undefined4 *)(param_1 + 8) = puVar3[2];
    *(undefined4 *)param_2 = uVar1;
    *(undefined4 *)(param_2 + 4) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 8);
    return;
  }
switchD_0042b009_caseD_4:
  UNRECOVERED_JUMPTABLE = *(code **)(**(int **)(this + 4) + 0x48);
LAB_0042b06e:
                    /* WARNING: Could not recover jumptable at 0x0042b075. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (*UNRECOVERED_JUMPTABLE)();
  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)