L L4D2node

CBaseEntity::Use

0x00601660 · 161 bytes · __cdecl

_ZN11CBaseEntity3UseEPS_S0_8USE_TYPEf

Decompiled

undefined (4 params)

/* CBaseEntity::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */

void CBaseEntity::Use(int param_1)

{
  uint uVar1;
  code *UNRECOVERED_JUMPTABLE;
  undefined *puVar2;
  
  UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0xe0);
  if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
    if (((uint)UNRECOVERED_JUMPTABLE & 1) != 0) {
      UNRECOVERED_JUMPTABLE =
           *(code **)(UNRECOVERED_JUMPTABLE + *(int *)(param_1 + *(int *)(param_1 + 0xe4)) + -1);
    }
                    /* WARNING: Could not recover jumptable at 0x006016a7. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (*UNRECOVERED_JUMPTABLE)();
    return;
  }
  uVar1 = *(uint *)(param_1 + 0x180);
  if ((((uVar1 != 0xffffffff) &&
       (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) && (*(int **)(puVar2 + 4) != (int *)0x0)) {
                    /* WARNING: Could not recover jumptable at 0x0060170c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(**(int **)(puVar2 + 4) + 0x1ac))();
    return;
  }
  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)