L L4D2node

CAmbientGeneric::SetTransmit

0x005dcfa0 · 343 bytes · __cdecl

_ZN15CAmbientGeneric11SetTransmitEP18CCheckTransmitInfob

Decompiled

undefined (2 params)

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

void CAmbientGeneric::SetTransmit(CCheckTransmitInfo *param_1,bool param_2)

{
  uint uVar1;
  CBaseEntity *this;
  CBaseEntity *this_00;
  int *piVar2;
  undefined4 *puVar3;
  uint uVar4;
  undefined3 in_stack_00000009;
  undefined4 uStack0000000c;
  
  uVar1 = *(uint *)(param_1 + 0x4bc);
  if (uVar1 == 0xffffffff) {
    return;
  }
  uVar4 = uVar1 & 0xfff;
  puVar3 = (undefined4 *)(g_pEntityList + uVar4 * 0x10 + 4);
  if (puVar3 == (undefined4 *)0x0) {
    return;
  }
  if (*(uint *)(g_pEntityList + uVar4 * 0x10 + 8) != uVar1 >> 0xc) {
    return;
  }
  this = *(CBaseEntity **)(g_pEntityList + uVar4 * 0x10 + 4);
  if (this == (CBaseEntity *)0x0) {
    return;
  }
  if (param_1 == (CCheckTransmitInfo *)this) {
    return;
  }
  if (param_1[0x4b0] == (CCheckTransmitInfo)0x0) {
    return;
  }
  if (((byte)param_1[0x148] & 1) != 0) {
    return;
  }
  this_00 = *(CBaseEntity **)(*_param_2 + 0xc);
  if (this_00 == (CBaseEntity *)0x0) {
    return;
  }
  if (0.0 < *(float *)(param_1 + 0x444) || *(float *)(param_1 + 0x444) == 0.0) {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this);
    }
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    if (*(float *)(param_1 + 0x444) * *(float *)(param_1 + 0x444) <
        (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
        (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
        (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
        (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) +
        (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
        (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8))) {
      return;
    }
    uVar1 = *(uint *)(param_1 + 0x4bc);
    piVar2 = (int *)0x0;
    if (((uVar1 == 0xffffffff) ||
        (puVar3 = (undefined4 *)(g_pEntityList + (uVar1 & 0xfff) * 0x10 + 4),
        puVar3 == (undefined4 *)0x0)) || (puVar3[1] != uVar1 >> 0xc)) goto LAB_005dd0c9;
  }
  piVar2 = (int *)*puVar3;
LAB_005dd0c9:
  uStack0000000c = 0;
                    /* WARNING: Could not recover jumptable at 0x005dd0e2. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*piVar2 + 0x5c))();
  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)