L L4D2node

CPooledVBAllocator_ColorMesh::Deallocate

0x00185aa0 · 171 bytes · __thiscall

_ZN28CPooledVBAllocator_ColorMesh10DeallocateEii

Decompiled

undefined (3 params)

/* CPooledVBAllocator_ColorMesh::Deallocate(int, int) */

void __thiscall
CPooledVBAllocator_ColorMesh::Deallocate(CPooledVBAllocator_ColorMesh *this,int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  
  if (*(int *)(this + 4) == 0) {
    Warning();
    return;
  }
  if (*(int *)(this + 0x14) != 0) {
    if (*(int *)(this + 0x18) < param_2) {
      Warning(
             "ERROR: CPooledVBAllocator_ColorMesh::Deallocate called with too many verts, trying to free more than were allocated (bug in calling code)\n"
             );
      iVar1 = *(int *)(this + 0x14);
      this[0x20] = (CPooledVBAllocator_ColorMesh)0x1;
      *(undefined4 *)(this + 0x18) = 0;
      *(undefined4 *)(this + 0x1c) = 0;
      *(int *)(this + 0x14) = iVar1 + -1;
      if (iVar1 + -1 != 0) {
        return;
      }
    }
    else {
      iVar1 = *(int *)(this + 0x14) + -1;
      iVar2 = *(int *)(this + 0x18) - param_2;
      this[0x20] = (CPooledVBAllocator_ColorMesh)0x1;
      *(int *)(this + 0x14) = iVar1;
      *(int *)(this + 0x18) = iVar2;
      *(undefined4 *)(this + 0x1c) = 0;
      if (iVar1 != 0) {
        return;
      }
      if (iVar2 != 0) {
        Warning(
               "ERROR: CPooledVBAllocator_ColorMesh::Deallocate, after all allocations have been freed too few verts total have been deallocated (bug in calling code)\n"
               );
      }
    }
    this[0x20] = (CPooledVBAllocator_ColorMesh)0x0;
    return;
  }
  Warning();
  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)