L L4D2node

CPointSpotlight::OnEntityEvent

0x007dc7a0 · 280 bytes · __cdecl

_ZN15CPointSpotlight13OnEntityEventE13EntityEvent_tPv

Decompiled

undefined (2 params)

/* CPointSpotlight::OnEntityEvent(EntityEvent_t, void*) */

void CPointSpotlight::OnEntityEvent(CBaseEntity *param_1,int param_2)

{
  uint uVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined1 local_24 [20];
  
  puVar3 = g_pEntityList;
  if (param_2 == 2) {
    uVar1 = *(uint *)(param_1 + 0x188);
    if ((((uVar1 != 0xffffffff) &&
         (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar2 + 4) != 0)) {
      uVar1 = *(uint *)(param_1 + 0x470);
      param_1[0x441] = (CBaseEntity)0x0;
      if (((uVar1 != 0xffffffff) &&
          (puVar3 = puVar3 + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar3 + 8) == uVar1 >> 0xc &&
          (*(CBaseEntity **)(puVar3 + 4) != (CBaseEntity *)0x0)))) {
        CBaseEntity::SetMoveType(*(CBaseEntity **)(puVar3 + 4),4,0);
      }
      CBaseEntity::ThinkSet((_func_void *)local_24,(float)param_1,(char *)SpotlightThink);
      CBaseEntity::SetNextThink(param_1,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
    }
  }
  CBaseEntity::OnEntityEvent();
  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)