L L4D2node

ConVar::InternalSetValue

0x0003e320 · 382 bytes · __thiscall

_ZN6ConVar16InternalSetValueEPKc

Decompiled

undefined (2 params)

/* ConVar::InternalSetValue(char const*) */

void __thiscall ConVar::InternalSetValue(ConVar *this,char *param_1)

{
  undefined4 uVar1;
  char cVar2;
  undefined4 uVar3;
  char *pcVar4;
  int in_GS_OFFSET;
  longdouble lVar5;
  double dVar6;
  float local_44;
  char local_40 [32];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  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 + 0x84))(g_pCVar,this,param_1);
      goto LAB_0003e3e3;
    }
  }
  uVar1 = *(undefined4 *)(this + 0x2c);
  pcVar4 = "";
  if (param_1 != (char *)0x0) {
    pcVar4 = param_1;
  }
  lVar5 = (longdouble)V_atod(param_1);
  dVar6 = (double)lVar5;
  local_44 = (float)lVar5;
  if (((uint)local_44 & 0x7f800000) == 0x7f800000) {
    uVar3 = (**(code **)(*(int *)this + 0x1c))(this);
    Warning("Warning:  %s = \'%s\' is infinite, clamping value.\n",uVar3,param_1);
    local_44 = 3.4028235e+38;
    dVar6 = 3.4028234663852886e+38;
  }
  cVar2 = (**(code **)(*(int *)this + 0x5c))(this,&local_44);
  if (cVar2 != '\0') {
    pcVar4 = local_40;
    dVar6 = (double)local_44;
    V_snprintf(pcVar4,0x20,"%f",dVar6);
  }
  *(float *)(this + 0x2c) = local_44;
  *(int *)(this + 0x30) = (int)dVar6;
  if (((byte)this[0x15] & 0x10) == 0) {
    (**(code **)(*(int *)this + 0x60))(this,pcVar4,uVar1);
  }
LAB_0003e3e3:
  if (local_20 == *(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)