L L4D2node

CLight::Use

0x006e60f0 · 73 bytes · __cdecl

_ZN6CLight3UseEP11CBaseEntityS1_8USE_TYPEf

Decompiled

undefined (4 params)

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

void CLight::Use(CBaseEntity *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  
  if (0x1f < *(int *)(param_1 + 0x440)) {
    iVar1 = CBaseEntity::ShouldToggle(param_1,param_4,*(uint *)(param_1 + 0x148) & 1 ^ 1);
    if (iVar1 != 0) {
      Toggle((CLight *)param_1);
      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)