L L4D2node

CEnvLaser::TurnOn

0x00685c80 · 214 bytes · __thiscall

_ZN9CEnvLaser6TurnOnEv

Decompiled

undefined (1 param)

/* CEnvLaser::TurnOn() */

void __thiscall CEnvLaser::TurnOn(CEnvLaser *this)

{
  CBaseEdict *this_00;
  int iVar1;
  uint *puVar2;
  uint uVar3;
  undefined1 local_14 [8];
  
  uVar3 = *(uint *)(this + 0xd4) & 0xffffffdf;
  if (*(uint *)(this + 0xd4) == uVar3) {
    puVar2 = *(uint **)(this + 0x30);
  }
  else {
    if (this[0x6c] == (CEnvLaser)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      puVar2 = (uint *)0x0;
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar1 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar1 + 2) = 0;
        puVar2 = *(uint **)(this + 0x30);
      }
    }
    else {
      this[0x70] = (CEnvLaser)((byte)this[0x70] | 1);
      puVar2 = *(uint **)(this + 0x30);
    }
    *(uint *)(this + 0xd4) = uVar3;
  }
  if (puVar2 != (uint *)0x0) {
    *puVar2 = *puVar2 | 0x80;
  }
  CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
  if (*(CSprite **)(this + 0x4e8) != (CSprite *)0x0) {
    CSprite::TurnOn(*(CSprite **)(this + 0x4e8));
  }
  *(undefined4 *)(this + 0x448) = *(undefined4 *)(gpGlobals + 0xc);
  CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)StrikeThink);
  StrikeThink(this);
  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)