L L4D2node

CBaseEntity::SetModel

0x00600740 · 109 bytes · __thiscall

_ZN11CBaseEntity8SetModelEPKc

Decompiled

undefined (2 params)

/* CBaseEntity::SetModel(char const*) */

void __thiscall CBaseEntity::SetModel(CBaseEntity *this,char *param_1)

{
  undefined4 uVar1;
  int iVar2;
  
  uVar1 = (**(code **)(*modelinfo + 0xc))(modelinfo,param_1);
  iVar2 = (**(code **)(*modelinfo + 8))(modelinfo,uVar1);
  if (iVar2 != 0) {
    iVar2 = (**(code **)(*modelinfo + 0x2c))(modelinfo,iVar2);
    if (iVar2 != 1) {
      Msg("Setting CBaseEntity to non-brush model %s\n",param_1);
    }
  }
  UTIL_SetModel(this,param_1);
  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)