L L4D2node

CBaseEntity::AddContextForScriptNumeric

0x0061b4f0 · 141 bytes · __thiscall

_ZN11CBaseEntity26AddContextForScriptNumericEPKcff

Decompiled

undefined (4 params)

/* CBaseEntity::AddContextForScriptNumeric(char const*, float, float) */

void __thiscall
CBaseEntity::AddContextForScriptNumeric(CBaseEntity *this,char *param_1,float param_2,float param_3)

{
  int in_GS_OFFSET;
  float fVar1;
  char local_60 [64];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_snprintf(local_60,0x3f,"%f",(double)param_2);
  fVar1 = 0.0;
  if (0.0 <= param_3) {
    fVar1 = *(float *)(gpGlobals + 0xc) + param_3;
  }
  AddContext(this,param_1,local_60,fVar1);
  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)