L L4D2node

CUtlVector<CClientSendProp,CUtlMemory<CClientSendProp,int>>::SetCount

0x00145e90 · 191 bytes · __thiscall

_ZN10CUtlVectorI15CClientSendProp10CUtlMemoryIS0_iEE8SetCountEi

Decompiled

undefined (2 params)

/* CUtlVector<CClientSendProp, CUtlMemory<CClientSendProp, int> >::SetCount(int) */

void __thiscall
CUtlVector<CClientSendProp,CUtlMemory<CClientSendProp,int>>::SetCount
          (CUtlVector<CClientSendProp,CUtlMemory<CClientSendProp,int>> *this,int param_1)

{
  CClientSendProp *pCVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = *(int *)(this + 0xc) + -1;
  iVar3 = iVar2 * 4;
  if (-1 < iVar2) {
    do {
      iVar2 = iVar2 + -1;
      pCVar1 = (CClientSendProp *)(*(int *)this + iVar3);
      iVar3 = iVar3 + -4;
      CClientSendProp::~CClientSendProp(pCVar1);
    } while (iVar2 != -1);
  }
  *(undefined4 *)(this + 0xc) = 0;
  if (param_1 != 0) {
    GrowVector(this,param_1);
    if (*(int *)(this + 0xc) - param_1 < 1) {
      if (0 < param_1) {
LAB_00145f05:
        iVar2 = 0;
        do {
          pCVar1 = (CClientSendProp *)(*(int *)this + iVar2 * 4);
          if (pCVar1 != (CClientSendProp *)0x0) {
            CClientSendProp::CClientSendProp(pCVar1);
          }
          iVar2 = iVar2 + 1;
        } while (iVar2 < param_1);
        return;
      }
    }
    else if (0 < param_1) {
      _V_memmove((void *)((int)*(void **)this + param_1 * 4),*(void **)this,
                 (*(int *)(this + 0xc) - param_1) * 4);
      goto LAB_00145f05;
    }
  }
  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)