L L4D2node

CNetworkStringTableItem::SetUserData

0x001acc20 · 177 bytes · __thiscall

_ZN23CNetworkStringTableItem11SetUserDataEiiPKv

Decompiled

undefined (4 params)

/* CNetworkStringTableItem::SetUserData(int, int, void const*) */

undefined4 __thiscall
CNetworkStringTableItem::SetUserData
          (CNetworkStringTableItem *this,int param_1,int param_2,void *param_3)

{
  void *pvVar1;
  int iVar2;
  
  if (*(int *)(this + 0x10) != 0) {
    UpdateChangeList(this,param_1,param_2,param_3);
    return 0;
  }
  pvVar1 = *(void **)this;
  if (param_3 == (void *)0x0) {
    if (pvVar1 == (void *)0x0) {
      return 0;
    }
  }
  else if (pvVar1 == (void *)0x0) goto LAB_001acc77;
  if (*(int *)(this + 4) == param_2) {
    iVar2 = _V_memcmp(pvVar1,param_3,param_2);
    if (iVar2 == 0) {
      return 0;
    }
    pvVar1 = *(void **)this;
    if (pvVar1 == (void *)0x0) goto LAB_001acc77;
  }
  operator_delete__(pvVar1);
LAB_001acc77:
  *(int *)(this + 4) = param_2;
  if (param_2 < 1) {
    *(undefined4 *)this = 0;
  }
  else {
    pvVar1 = operator_new__(param_2);
    *(void **)this = pvVar1;
    _V_memcpy(pvVar1,param_3,param_2);
  }
  *(int *)(this + 8) = param_1;
  return 1;
}

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)