L L4D2node

CSprite::Use

0x004c3b70 · 84 bytes · __cdecl

_ZN7CSprite3UseEP11CBaseEntityS1_8USE_TYPEf

Decompiled

undefined (4 params)

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

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

{
  int iVar1;
  bool bVar2;
  
  bVar2 = ((byte)param_1[0xd4] & 0x20) == 0;
  iVar1 = CBaseEntity::ShouldToggle(param_1,param_4,bVar2);
  if (iVar1 == 0) {
    return;
  }
  if (!bVar2) {
    TurnOn((CSprite *)param_1);
    return;
  }
  TurnOff((CSprite *)param_1);
  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)