L L4D2node

CMDLCacheNotify::OnDataLoaded

0x0019a200 · 278 bytes · __thiscall

_ZN15CMDLCacheNotify12OnDataLoadedE18MDLCacheDataType_tt

Decompiled

undefined (3 params)

/* CMDLCacheNotify::OnDataLoaded(MDLCacheDataType_t, unsigned short) */

void __thiscall CMDLCacheNotify::OnDataLoaded(CMDLCacheNotify *this,int param_2,ushort param_3)

{
  model_t *pmVar1;
  int iVar2;
  Vector local_34 [12];
  Vector local_28 [24];
  
  pmVar1 = (model_t *)(**(code **)(*g_pMDLCache + 0x50))(g_pMDLCache,param_3);
  if (pmVar1 != (model_t *)0x0) {
    if (param_2 == 1) {
      ComputeModelFlags(this,pmVar1,param_3);
      return;
    }
    if (param_2 == 2) {
      SetBoundsFromStudioHdr(this,pmVar1,param_3);
      iVar2 = (**(code **)(*g_pMDLCache + 0x30))(g_pMDLCache,param_3);
      if ((iVar2 != 0) && (*(undefined4 **)(iVar2 + 4) != (undefined4 *)0x0)) {
        (**(code **)(*physcollision + 0x60))
                  (physcollision,local_34,local_28,**(undefined4 **)(iVar2 + 4),&vec3_origin,
                   &vec3_angle);
        AddPointToBounds(local_34,(Vector *)(pmVar1 + 0x118),(Vector *)(pmVar1 + 0x124));
        AddPointToBounds(local_28,(Vector *)(pmVar1 + 0x118),(Vector *)(pmVar1 + 0x124));
        return;
      }
    }
    else if (param_2 == 0) {
      SetBoundsFromStudioHdr(this,pmVar1,param_3);
      return;
    }
  }
  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)