L L4D2node

CCoreDispInfo::GenerateDispSurfNormals

0x000c0750 · 245 bytes · __thiscall

_ZN13CCoreDispInfo23GenerateDispSurfNormalsEv

Decompiled

undefined (1 param)

/* CCoreDispInfo::GenerateDispSurfNormals() */

void __thiscall CCoreDispInfo::GenerateDispSurfNormals(CCoreDispInfo *this)

{
  bool bVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int local_3c;
  int local_38;
  int local_30;
  bool local_2c [4];
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  iVar2 = (1 << ((byte)*(undefined4 *)(this + 0xc) & 0x1f)) + 1;
  if (0 < iVar2) {
    local_3c = 0;
    local_30 = 0;
    do {
      local_38 = local_3c;
      iVar3 = 0;
      do {
        iVar4 = 0;
        do {
          bVar1 = (bool)DoesEdgeExist(this,iVar3,local_30,iVar4,iVar2);
          local_2c[iVar4] = bVar1;
          iVar4 = iVar4 + 1;
        } while (iVar4 != 4);
        iVar4 = iVar3 + 1;
        CalcNormalFromEdges(this,iVar3,local_30,local_2c,(Vector *)&local_28);
        iVar3 = local_38 + *(int *)(this + 0x1b8);
        *(undefined4 *)(iVar3 + 0x40) = local_28;
        *(undefined4 *)(iVar3 + 0x44) = local_24;
        *(undefined4 *)(iVar3 + 0x48) = local_20;
        iVar3 = iVar4;
        local_38 = local_38 + 0x90;
      } while (iVar2 != iVar4);
      local_30 = local_30 + 1;
      local_3c = local_3c + iVar2 * 0x90;
    } while (local_30 != iVar2);
  }
  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)