L L4D2node

CM_SetAreaPortalStates

0x0011b630 · 143 bytes · __cdecl

_Z22CM_SetAreaPortalStatesPKiS0_i

Decompiled

undefined (3 params)

/* CM_SetAreaPortalStates(int const*, int const*, int) */

void CM_SetAreaPortalStates(int *param_1,int *param_2,int param_3)

{
  int iVar1;
  int iVar2;
  
  if (param_3 == 0) {
    return;
  }
  iVar2 = 0;
  if (0 < param_3) {
    do {
      iVar1 = param_1[iVar2];
      if (DAT_00394530 < iVar1) {
        Sys_Error("portalnum > numareaportals");
        iVar1 = param_1[iVar2];
      }
      if ((iVar1 < 0) || (DAT_00394560 <= iVar1)) {
        Error("Cannot load corrupted map.\n");
      }
      *(bool *)(DAT_0039455c + iVar1) = param_2[iVar2] != 0;
      iVar2 = iVar2 + 1;
    } while (iVar2 != param_3);
  }
  FloodAreaConnections((CCollisionBSPData *)&g_BSPData);
  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)