L L4D2node

CFogVolume::AddToGlobalList

0x008d0980 · 254 bytes · __thiscall

_ZN10CFogVolume15AddToGlobalListEv.part.28

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CFogVolume::AddToGlobalList() [clone .part.28] */

void __thiscall CFogVolume::AddToGlobalList(CFogVolume *this)

{
  int in_EAX;
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = DAT_01003e88;
  iVar1 = DAT_01003e88 + 1;
  if ((iVar1 <= _DAT_01003e80) || (DAT_01003e84 < 0)) goto LAB_008d09a2;
  if (DAT_01003e84 == 0) {
    if (_DAT_01003e80 == 0) {
      if (iVar1 < 9) {
        _DAT_01003e80 = 8;
        goto LAB_008d0a16;
      }
      _DAT_01003e80 = 8;
    }
    do {
      _DAT_01003e80 = _DAT_01003e80 * 2;
    } while (_DAT_01003e80 < iVar1);
  }
  else {
    for (_DAT_01003e80 = (DAT_01003e88 / DAT_01003e84 + 1) * DAT_01003e84; _DAT_01003e80 < iVar1;
        _DAT_01003e80 = (_DAT_01003e80 + iVar1) / 2) {
    }
  }
LAB_008d0a16:
  if (TheFogVolumes == (void *)0x0) {
    TheFogVolumes = malloc(_DAT_01003e80 << 2);
  }
  else {
    TheFogVolumes = realloc(TheFogVolumes,_DAT_01003e80 << 2);
    iVar1 = DAT_01003e88 + 1;
  }
LAB_008d09a2:
  iVar3 = iVar2 * 4;
  iVar2 = (iVar1 - iVar2) + -1;
  DAT_01003e88 = iVar1;
  _DAT_01003e8c = TheFogVolumes;
  if (0 < iVar2) {
    _V_memmove((void *)((int)TheFogVolumes + iVar3 + 4),(void *)((int)TheFogVolumes + iVar3),
               iVar2 * 4);
  }
  if ((int *)(iVar3 + (int)TheFogVolumes) != (int *)0x0) {
    *(int *)(iVar3 + (int)TheFogVolumes) = in_EAX;
  }
  *(undefined1 *)(in_EAX + 0x459) = 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)