L L4D2node

CBeam::SetTransmit

0x004253c0 · 194 bytes · __thiscall

_ZN5CBeam11SetTransmitEP18CCheckTransmitInfob

Decompiled

undefined (3 params)

/* CBeam::SetTransmit(CCheckTransmitInfo*, bool) */

void __thiscall CBeam::SetTransmit(CBeam *this,CCheckTransmitInfo *param_1,bool param_2)

{
  int *piVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  undefined *puVar5;
  
  if (*(int *)(this + 0x30) == 0) {
    uVar2 = 1;
    iVar4 = 0;
  }
  else {
    uVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    uVar2 = 1 << ((byte)uVar3 & 0x1f);
    iVar4 = (uVar3 >> 5) << 2;
  }
  if ((*(uint *)(*(int *)(param_1 + 0x2008) + iVar4) & uVar2) == 0) {
    iVar4 = 0;
    CBaseEntity::SetTransmit((CBaseEntity *)this,param_1,param_2);
    do {
      uVar2 = *(uint *)(this + iVar4 * 4 + 0x460);
      if ((((uVar2 != 0xffffffff) &&
           (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
         (piVar1 = *(int **)(puVar5 + 4), piVar1 != (int *)0x0)) {
        (**(code **)(*piVar1 + 0x5c))(piVar1,param_1,param_2);
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != 10);
  }
  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)