L L4D2node

CBaseClientState::GetClassBaseline

0x001028f0 · 329 bytes · __thiscall

_ZN16CBaseClientState16GetClassBaselineEiPPKvPi

Decompiled

undefined (4 params)

/* CBaseClientState::GetClassBaseline(int, void const**, int*) */

bool __thiscall
CBaseClientState::GetClassBaseline(CBaseClientState *this,int param_1,void **param_2,int *param_3)

{
  int *piVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  int in_GS_OFFSET;
  char local_60 [64];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((param_1 < 0) || (*(int *)(this + 0x41c8) <= param_1)) {
    Error("GetDynamicBaseline: invalid class index \'%d\'",param_1);
  }
  iVar4 = param_1 * 0x10 + *(int *)(this + 0x41c4);
  piVar1 = *(int **)(this + 0x49d4);
  if (piVar1 != (int *)0x0) {
    piVar1 = (int *)(**(code **)(*piVar1 + 0x10))(piVar1,"instancebaseline");
    if (piVar1 != (int *)0x0) goto LAB_00102956;
  }
  Error("GetDynamicBaseline: NULL baseline table");
  piVar1 = (int *)0x0;
LAB_00102956:
  iVar3 = *(int *)(iVar4 + 0xc);
  if (iVar3 == 0xffff) {
    V_snprintf(local_60,0x40,"%d",param_1);
    iVar3 = (**(code **)(*piVar1 + 0x34))(piVar1,local_60);
    *(int *)(iVar4 + 0xc) = iVar3;
    if (iVar3 == 0xffff) {
      Error("GetDynamicBaseline: FindStringIndex(%s-%s) failed.",local_60,*(undefined4 *)(iVar4 + 4)
           );
    }
    iVar3 = *(int *)(iVar4 + 0xc);
  }
  pvVar2 = (void *)(**(code **)(*piVar1 + 0x30))(piVar1,iVar3,param_3);
  *param_2 = pvVar2;
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar2 != (void *)0x0;
  }
                    /* 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)