L L4D2node

CVGuiScreen::KeyValue

0x00b3ea00 · 353 bytes · __thiscall

_ZN11CVGuiScreen8KeyValueEPKcS1_

Decompiled

undefined (3 params)

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

undefined4 __thiscall CVGuiScreen::KeyValue(CVGuiScreen *this,char *param_1,char *param_2)

{
  char *pcVar1;
  int iVar2;
  undefined4 uVar3;
  QAngle local_e8 [12];
  VMatrix local_dc [64];
  VMatrix local_9c [64];
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  
  pcVar1 = strchr(param_1,0x23);
  if (pcVar1 != (char *)0x0) {
    *pcVar1 = '\0';
  }
  if (param_1 != "panelname") {
    iVar2 = _V_stricmp(param_1,"panelname");
    if (iVar2 != 0) {
      if (param_1 != "angles") {
        iVar2 = _V_stricmp(param_1,"angles");
        if (iVar2 != 0) {
          uVar3 = CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
          return uVar3;
        }
      }
      UTIL_StringToVector((float *)local_e8,param_2);
      MatrixFromAngles(local_e8,local_dc);
      local_5c = 0;
      local_58 = 0x3f800000;
      local_54 = 0;
      MatrixBuildRotationAboutAxis(local_9c,(Vector *)&local_5c,90.0);
      MatrixMultiply(local_dc,local_9c,(VMatrix *)&local_5c);
      MatrixBuildRotateZ(local_9c,90.0);
      MatrixMultiply((VMatrix *)&local_5c,local_9c,local_dc);
      MatrixToAngles(local_dc,local_e8);
      CBaseEntity::SetAbsAngles((CBaseEntity *)this,local_e8);
      return 1;
    }
  }
  SetPanelName(this,param_2);
  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)