L L4D2node

CFuncSimpleLadder::KeyValue

0x004510d0 · 563 bytes · __thiscall

_ZN17CFuncSimpleLadder8KeyValueEPKcS1_

Decompiled

undefined (3 params)

/* CFuncSimpleLadder::KeyValue(char const*, char const*) */

void __thiscall CFuncSimpleLadder::KeyValue(CFuncSimpleLadder *this,char *param_1,char *param_2)

{
  CBaseEdict *pCVar1;
  int iVar2;
  long lVar3;
  double dVar4;
  
  if (param_1 != "normal.x") {
    iVar2 = _V_stricmp(param_1,"normal.x");
    if (iVar2 != 0) {
      if (param_1 != "normal.y") {
        iVar2 = _V_stricmp(param_1,"normal.y");
        if (iVar2 != 0) {
          if (param_1 != "normal.z") {
            iVar2 = _V_stricmp(param_1,"normal.z");
            if (iVar2 != 0) {
              if (param_1 != "team") {
                iVar2 = _V_stricmp(param_1,"team");
                if (iVar2 != 0) goto LAB_004511b0;
              }
              lVar3 = strtol(param_2,(char **)0x0,10);
              if (lVar3 == 1) {
                (**(code **)(*(int *)this + 0x194))(this,2);
              }
              else if (lVar3 == 2) {
                (**(code **)(*(int *)this + 0x194))(this,3);
              }
              else {
                (**(code **)(*(int *)this + 0x194))(this,0);
              }
              goto LAB_004511b0;
            }
          }
          if (this[0x6c] == (CFuncSimpleLadder)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar2 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CFuncSimpleLadder)((byte)this[0x70] | 1);
          }
          dVar4 = strtod(param_2,(char **)0x0);
          *(float *)(this + 0x448) = (float)dVar4;
          goto LAB_004511b0;
        }
      }
      if (this[0x6c] == (CFuncSimpleLadder)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CFuncSimpleLadder)((byte)this[0x70] | 1);
      }
      dVar4 = strtod(param_2,(char **)0x0);
      *(float *)(this + 0x444) = (float)dVar4;
      goto LAB_004511b0;
    }
  }
  if (this[0x6c] == (CFuncSimpleLadder)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar2 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CFuncSimpleLadder)((byte)this[0x70] | 1);
  }
  dVar4 = strtod(param_2,(char **)0x0);
  *(float *)(this + 0x440) = (float)dVar4;
LAB_004511b0:
  CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
  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)