L L4D2node

IGameSystem::Remove

0x00468220 · 283 bytes · __cdecl

_ZN11IGameSystem6RemoveEPS_

Decompiled

undefined (1 param)

/* IGameSystem::Remove(IGameSystem*) */

void IGameSystem::Remove(IGameSystem *param_1)

{
  int iVar1;
  int iVar2;
  
  if (0 < DAT_00f7cd98) {
    iVar1 = 0;
    if (param_1 != (IGameSystem *)*s_GameSystems) {
      do {
        iVar1 = iVar1 + 1;
        if (iVar1 == DAT_00f7cd98) goto LAB_00468254;
      } while (param_1 != (IGameSystem *)s_GameSystems[iVar1]);
      if (iVar1 == -1) goto LAB_00468254;
    }
    iVar2 = (DAT_00f7cd98 - iVar1) + -1;
    if (iVar2 < 1) {
      DAT_00f7cd98 = DAT_00f7cd98 + -1;
    }
    else {
      _V_memmove(s_GameSystems + iVar1,s_GameSystems + iVar1 + 1,iVar2 * 4);
      DAT_00f7cd98 = DAT_00f7cd98 + -1;
    }
  }
LAB_00468254:
  if (((param_1 == (IGameSystem *)0x0) ||
      (iVar1 = __dynamic_cast(param_1,&typeinfo,&IGameSystemPerFrame::typeinfo,0), iVar1 == 0)) ||
     (DAT_00f7cd84 < 1)) {
    return;
  }
  iVar1 = 0;
  if (param_1 != (IGameSystem *)*s_GameSystemsPerFrame) {
    do {
      iVar1 = iVar1 + 1;
      if (iVar1 == DAT_00f7cd84) {
        return;
      }
    } while (param_1 != (IGameSystem *)s_GameSystemsPerFrame[iVar1]);
    if (iVar1 == -1) {
      return;
    }
  }
  iVar2 = (DAT_00f7cd84 - iVar1) + -1;
  if (0 < iVar2) {
    _V_memmove(s_GameSystemsPerFrame + iVar1,s_GameSystemsPerFrame + iVar1 + 1,iVar2 * 4);
  }
  DAT_00f7cd84 = DAT_00f7cd84 + -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)