L L4D2node

CFishPool::KeyValue

0x006a34b0 · 422 bytes · __thiscall

_ZN9CFishPool8KeyValueEPKcS1_

Decompiled

undefined (3 params)

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

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

{
  CBaseEdict *this_00;
  int iVar1;
  undefined1 *puVar2;
  int iVar3;
  undefined4 uVar4;
  long lVar5;
  float fVar6;
  double dVar7;
  undefined1 *local_20 [4];
  
  if ((param_1 == "fish_count") || (iVar1 = _V_stricmp(param_1,"fish_count"), iVar1 == 0)) {
    lVar5 = strtol(param_2,(char **)0x0,10);
    *(long *)(this + 0x44c) = lVar5;
    return 1;
  }
  if ((param_1 != "max_range") && (iVar1 = _V_stricmp(param_1,"max_range"), iVar1 != 0)) {
    if ((param_1 == "model") || (iVar1 = _V_stricmp(param_1,"model"), iVar1 == 0)) {
      CBaseEntity::PrecacheModel(param_2);
      AllocPooledString((char *)local_20);
      *(undefined1 **)(this + 0x260) = local_20[0];
      CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
      puVar2 = &DAT_00d539c2;
      if (local_20[0] != (undefined1 *)0x0) {
        puVar2 = local_20[0];
      }
      iVar1 = (**(code **)(*soundemitterbase + 0x88))(soundemitterbase,puVar2);
      if (iVar1 != *(int *)(this + 0xf4)) {
        if (this[0x6c] == (CFishPool)0x0) {
          this_00 = *(CBaseEdict **)(this + 0x30);
          if (this_00 != (CBaseEdict *)0x0) {
            *(uint *)this_00 = *(uint *)this_00 | 0x101;
            iVar3 = CBaseEdict::GetChangeAccessor(this_00);
            *(undefined2 *)(iVar3 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CFishPool)((byte)this[0x70] | 1);
        }
        *(int *)(this + 0xf4) = iVar1;
      }
    }
    uVar4 = CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
    return uVar4;
  }
  dVar7 = strtod(param_2,(char **)0x0);
  fVar6 = (float)dVar7;
  if (fVar6 <= 1.0) {
    *(undefined4 *)(this + 0x450) = 0x3f800000;
    return 1;
  }
  if (255.0 < fVar6) {
    *(undefined4 *)(this + 0x450) = 0x437f0000;
    return 1;
  }
  *(float *)(this + 0x450) = fVar6;
  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)