L L4D2node

HidingSpot::HidingSpot

0x0073ecc0 · 201 bytes · __thiscall

_ZN10HidingSpotC1Ev

Decompiled

undefined (1 param)

/* HidingSpot::HidingSpot() */

void __thiscall HidingSpot::HidingSpot(HidingSpot *this)

{
  size_t __size;
  int iVar1;
  int iVar2;
  int *piVar3;
  
  *(undefined ***)this = &PTR__HidingSpot_00ca8570;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 0;
  this[0x1c] = (HidingSpot)0x0;
  *(int *)(this + 0x10) = m_nextID;
  piVar3 = TheHidingSpots;
  m_nextID = m_nextID + 1;
  *(undefined4 *)(this + 0x18) = 0;
  iVar1 = *piVar3;
  if (piVar3 == &CUtlVectorUltraConservative<HidingSpot*,CUtlVectorUltraConservativeAllocator>::
                 StaticData()::staticData) {
    piVar3 = malloc((iVar1 + 1) * 4 + 4);
    iVar2 = 1;
    TheHidingSpots = piVar3;
    *piVar3 = 0;
  }
  else {
    __size = (iVar1 + 1) * 4 + 4;
    iVar2 = malloc_usable_size(piVar3);
    if (iVar2 < (int)__size) {
      piVar3 = realloc(TheHidingSpots,__size);
      iVar2 = *piVar3;
      TheHidingSpots = piVar3;
      piVar3[iVar1 + 1] = (int)this;
      *piVar3 = iVar2 + 1;
      return;
    }
    iVar2 = *TheHidingSpots + 1;
    piVar3 = TheHidingSpots;
  }
  piVar3[iVar1 + 1] = (int)this;
  *piVar3 = 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)