L L4D2node

CModelInfo::GetModelRenderBounds

0x00193940 · 405 bytes · __thiscall

_ZNK10CModelInfo20GetModelRenderBoundsEPK7model_tR6VectorS4_

Decompiled

undefined (4 params)

/* CModelInfo::GetModelRenderBounds(model_t const*, Vector&, Vector&) const */

void __thiscall
CModelInfo::GetModelRenderBounds(CModelInfo *this,model_t *param_1,Vector *param_2,Vector *param_3)

{
  float fVar1;
  int iVar2;
  
  if (param_1 != (model_t *)0x0) {
    if (*(int *)(param_1 + 0x110) == 1) {
      *(undefined4 *)param_2 = *(undefined4 *)(param_1 + 0x118);
      *(undefined4 *)(param_2 + 4) = *(undefined4 *)(param_1 + 0x11c);
      *(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 0x120);
      *(undefined4 *)param_3 = *(undefined4 *)(param_1 + 0x124);
      *(undefined4 *)(param_3 + 4) = *(undefined4 *)(param_1 + 0x128);
      *(undefined4 *)(param_3 + 8) = *(undefined4 *)(param_1 + 300);
      return;
    }
    if (*(int *)(param_1 + 0x110) == 3) {
      iVar2 = (**(code **)(*(int *)modelloader + 0x14))(modelloader,param_1);
      fVar1 = *(float *)(iVar2 + 0x80);
      if ((((fVar1 == vec3_origin) && (*(float *)(iVar2 + 0x84) == DAT_004024cc)) &&
          (*(float *)(iVar2 + 0x88) == DAT_004024d0)) &&
         (((fVar1 == *(float *)(iVar2 + 0x8c) &&
           (*(float *)(iVar2 + 0x84) == *(float *)(iVar2 + 0x90))) &&
          (*(float *)(iVar2 + 0x88) == *(float *)(iVar2 + 0x94))))) {
        *(undefined4 *)param_2 = *(undefined4 *)(iVar2 + 0x68);
        *(undefined4 *)(param_2 + 4) = *(undefined4 *)(iVar2 + 0x6c);
        *(undefined4 *)(param_2 + 8) = *(undefined4 *)(iVar2 + 0x70);
        *(undefined4 *)param_3 = *(undefined4 *)(iVar2 + 0x74);
        *(undefined4 *)(param_3 + 4) = *(undefined4 *)(iVar2 + 0x78);
        *(undefined4 *)(param_3 + 8) = *(undefined4 *)(iVar2 + 0x7c);
        return;
      }
      *(float *)param_2 = fVar1;
      *(undefined4 *)(param_2 + 4) = *(undefined4 *)(iVar2 + 0x84);
      *(undefined4 *)(param_2 + 8) = *(undefined4 *)(iVar2 + 0x88);
      *(undefined4 *)param_3 = *(undefined4 *)(iVar2 + 0x8c);
      *(undefined4 *)(param_3 + 4) = *(undefined4 *)(iVar2 + 0x90);
      *(undefined4 *)(param_3 + 8) = *(undefined4 *)(iVar2 + 0x94);
      return;
    }
  }
  *(undefined4 *)param_2 = 0;
  *(undefined4 *)(param_2 + 4) = 0;
  *(undefined4 *)(param_2 + 8) = 0;
  *(undefined4 *)param_3 = 0;
  *(undefined4 *)(param_3 + 4) = 0;
  *(undefined4 *)(param_3 + 8) = 0;
  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)