L L4D2node

CM_InlineModel

0x00119270 · 152 bytes · __cdecl

_Z14CM_InlineModelPKc

Decompiled

undefined (1 param)

/* CM_InlineModel(char const*) */

undefined4 CM_InlineModel(char *param_1)

{
  long lVar1;
  undefined4 uVar2;
  int iVar3;
  char *pcVar4;
  char *pcVar5;
  bool bVar6;
  
  if (param_1 == (char *)0x0) {
    return 0;
  }
  iVar3 = 5;
  bVar6 = false;
  pcVar4 = param_1;
  pcVar5 = "maps/";
  do {
    if (iVar3 == 0) break;
    iVar3 = iVar3 + -1;
    bVar6 = *pcVar4 == *pcVar5;
    pcVar4 = pcVar4 + 1;
    pcVar5 = pcVar5 + 1;
  } while (bVar6);
  if (!bVar6) {
    if (*param_1 != '*') {
      Sys_Error("CM_InlineModel: bad model name!");
    }
    lVar1 = strtol(param_1 + 1,(char **)0x0,10);
    if ((lVar1 < 1) || (DAT_003943b4 <= lVar1)) {
      Sys_Error("CM_InlineModel: bad model number!");
    }
    uVar2 = CM_InlineModelNumber(lVar1);
    return uVar2;
  }
  uVar2 = CM_InlineModelNumber(0);
  return uVar2;
}

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)