L L4D2node

Mod_LoadVertNormals

0x00196a40 · 308 bytes · unknown

_Z19Mod_LoadVertNormalsv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Mod_LoadVertNormals() */

void Mod_LoadVertNormals(void)

{
  int iVar1;
  undefined1 *puVar2;
  char *pcVar3;
  void *__dest;
  uint uVar4;
  int in_GS_OFFSET;
  uint local_140 [3];
  int local_134;
  void *local_130;
  int local_128;
  undefined1 local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  CMapLoadHelper::CMapLoadHelper((CMapLoadHelper *)local_140,0x1e);
  if (local_140[0] != (local_140[0] / 0xc) * 0xc) {
                    /* try { // try from 00196b5f to 00196b63 has its CatchHandler @ 00196b74 */
    Host_Error("Mod_LoadVertNormals: funny lump size in %s!\n",s_szMapPathName);
  }
  uVar4 = local_140[0] / 0xc;
  puVar2 = s_szMapPathName;
  if ((&s_MapLumpFiles)[local_128 * 7] != 0) {
    puVar2 = local_124;
  }
                    /* try { // try from 00196ad8 to 00196af6 has its CatchHandler @ 00196b74 */
  pcVar3 = (char *)va("%s [%s]",puVar2,"vertnormals");
  __dest = (void *)Hunk_AllocName(local_140[0],pcVar3,true);
  memcpy(__dest,local_130,local_140[0]);
  iVar1 = s_pMap;
  *(void **)(s_pMap + 0x48) = __dest;
  *(uint *)(iVar1 + 0x44) = uVar4;
  if (local_134 != 0) {
    (**(code **)(*g_pFileSystem + 0x150))(g_pFileSystem,local_134);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)