L L4D2node

Test_ProxyToggle_SetValue

0x00af3900 · 181 bytes · __cdecl

_Z25Test_ProxyToggle_SetValueRK8CCommand

Decompiled

undefined (1 param)

/* Test_ProxyToggle_SetValue(CCommand const&) */

void Test_ProxyToggle_SetValue(CCommand *param_1)

{
  CBaseEdict *this;
  long lVar1;
  int iVar2;
  int iVar3;
  char *__nptr;
  
  if (*(int *)param_1 < 2) {
    Error("Test_ProxyToggle_SetValue: requires value parameter.");
    iVar3 = *(int *)param_1;
LAB_00af399e:
    if (iVar3 < 2) {
      __nptr = "";
      goto LAB_00af3928;
    }
  }
  else if (g_pTestObj == 0) {
    Error("Test_ProxyToggle_SetValue: no entity present.");
    iVar3 = *(int *)param_1;
    goto LAB_00af399e;
  }
  __nptr = *(char **)(param_1 + 0x40c);
LAB_00af3928:
  lVar1 = strtol(__nptr,(char **)0x0,10);
  iVar3 = g_pTestObj;
  if (lVar1 != *(int *)(g_pTestObj + 0x440)) {
    if (*(char *)(g_pTestObj + 0x6c) == '\0') {
      this = *(CBaseEdict **)(g_pTestObj + 0x30);
      if (this != (CBaseEdict *)0x0) {
        *(uint *)this = *(uint *)this | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(this);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      *(byte *)(g_pTestObj + 0x70) = *(byte *)(g_pTestObj + 0x70) | 1;
    }
    *(long *)(iVar3 + 0x440) = lVar1;
  }
  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)