L L4D2node

CCollisionProperty::SetCollisionBounds

0x0042b510 · 353 bytes · __thiscall

_ZN18CCollisionProperty18SetCollisionBoundsERK6VectorS2_

Decompiled

undefined (3 params)

/* CCollisionProperty::SetCollisionBounds(Vector const&, Vector const&) */

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

{
  float fVar1;
  float fVar2;
  float fVar3;
  
  if (*(float *)param_1 == *(float *)(this + 8)) {
    if ((*(float *)(param_1 + 4) == *(float *)(this + 0xc)) &&
       (*(float *)(param_1 + 8) == *(float *)(this + 0x10))) {
      if ((*(float *)(this + 0x14) == *(float *)param_2) &&
         ((*(float *)(param_2 + 4) == *(float *)(this + 0x18) &&
          (*(float *)(param_2 + 8) == *(float *)(this + 0x1c))))) {
        return;
      }
    }
    if ((*(float *)(param_1 + 4) != *(float *)(this + 0xc)) ||
       (*(float *)(param_1 + 8) != *(float *)(this + 0x10))) goto LAB_0042b53a;
    fVar1 = *(float *)param_2;
    if (fVar1 == *(float *)(this + 0x14)) goto LAB_0042b570;
  }
  else {
LAB_0042b53a:
    (**(code **)(*(int *)this + 0x50))(this,this + 8);
    *(undefined4 *)(this + 8) = *(undefined4 *)param_1;
    *(undefined4 *)(this + 0xc) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_1 + 8);
    fVar1 = *(float *)param_2;
    if (fVar1 == *(float *)(this + 0x14)) {
LAB_0042b570:
      fVar3 = *(float *)(param_2 + 4);
      if ((fVar3 == *(float *)(this + 0x18)) &&
         (fVar2 = *(float *)(param_2 + 8), fVar2 == *(float *)(this + 0x1c))) goto LAB_0042b5ca;
    }
  }
  (**(code **)(*(int *)this + 0x50))(this,this + 0x14);
  *(undefined4 *)(this + 0x14) = *(undefined4 *)param_2;
  *(undefined4 *)(this + 0x18) = *(undefined4 *)(param_2 + 4);
  *(undefined4 *)(this + 0x1c) = *(undefined4 *)(param_2 + 8);
  fVar1 = *(float *)param_2;
  fVar3 = *(float *)(param_2 + 4);
  fVar2 = *(float *)(param_2 + 8);
LAB_0042b5ca:
  *(float *)(this + 0x24) =
       SQRT((fVar1 - *(float *)param_1) * (fVar1 - *(float *)param_1) +
            (fVar3 - *(float *)(param_1 + 4)) * (fVar3 - *(float *)(param_1 + 4)) +
            (fVar2 - *(float *)(param_1 + 8)) * (fVar2 - *(float *)(param_1 + 8))) * 0.5;
  MarkSurroundingBoundsDirty(this);
  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)