L L4D2node

ConVar::InternalSetIntValue

0x002473f0 · 245 bytes · __thiscall

_ZN6ConVar19InternalSetIntValueEi

Decompiled

undefined (2 params)

/* ConVar::InternalSetIntValue(int) */

void __thiscall ConVar::InternalSetIntValue(ConVar *this,int param_1)

{
  undefined4 uVar1;
  char cVar2;
  int in_GS_OFFSET;
  float local_34;
  char local_30 [32];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(this + 0x30) != param_1) {
    cVar2 = (**(code **)(*(int *)this + 0xc))(this,0xb00000);
    if ((cVar2 != '\0') && (g_pCVar != (int *)0x0)) {
      cVar2 = (**(code **)(*g_pCVar + 0x80))(g_pCVar);
      if (cVar2 == '\0') {
        (**(code **)(*g_pCVar + 0x88))(g_pCVar,this,param_1);
        goto LAB_00247476;
      }
    }
    local_34 = (float)param_1;
    cVar2 = (**(code **)(*(int *)this + 0x5c))(this,&local_34);
    if (cVar2 != '\0') {
      param_1 = (int)local_34;
    }
    *(int *)(this + 0x30) = param_1;
    uVar1 = *(undefined4 *)(this + 0x2c);
    *(float *)(this + 0x2c) = local_34;
    if (((byte)this[0x15] & 0x10) == 0) {
      V_snprintf(local_30,0x20,"%d",param_1);
      (**(code **)(*(int *)this + 0x60))(this,local_30,uVar1);
    }
  }
LAB_00247476:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)