L L4D2node

CModelRender::IsModelInstanceValid

0x001891b0 · 72 bytes · __thiscall

_ZN12CModelRender20IsModelInstanceValidEt

Decompiled

undefined (2 params)

/* CModelRender::IsModelInstanceValid(unsigned short) */

bool __thiscall CModelRender::IsModelInstanceValid(CModelRender *this,ushort param_1)

{
  int iVar1;
  undefined4 *puVar2;
  bool bVar3;
  
  if (param_1 != 0xffff) {
    puVar2 = (undefined4 *)((uint)param_1 * 0x108 + *(int *)(this + 0xc));
    bVar3 = false;
    if (puVar2[2] != 0) {
      iVar1 = (**(code **)(*(int *)*puVar2 + 0x20))((int *)*puVar2);
      bVar3 = iVar1 == puVar2[1];
    }
    return bVar3;
  }
  return false;
}

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)