L L4D2node

SV_DetermineMulticastRecipients

0x001fc4e0 · 351 bytes · __cdecl

_Z31SV_DetermineMulticastRecipientsbRK6VectorR7CBitVecILi32EE

Decompiled

undefined (3 params)

/* SV_DetermineMulticastRecipients(bool, Vector const&, CBitVec<32>&) */

void SV_DetermineMulticastRecipients(bool param_1,Vector *param_2,CBitVec *param_3)

{
  int *piVar1;
  byte *pbVar2;
  char cVar3;
  byte bVar4;
  int iVar5;
  int iVar6;
  uint uVar7;
  int iVar8;
  int in_GS_OFFSET;
  Vector local_202c [12];
  uchar local_2020 [8192];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar5 = CM_PointLeafnum(param_2);
  iVar5 = CM_LeafCluster(iVar5);
  iVar5 = CM_Vis(local_2020,0x2000,iVar5,(uint)param_1);
  if (param_3 != (CBitVec *)0x0) {
    *(undefined4 *)param_3 = 0;
  }
  iVar8 = 0;
  if (0 < DAT_003b8080) {
    do {
      piVar1 = *(int **)(DAT_003b8074 + iVar8 * 4);
      cVar3 = (**(code **)(*piVar1 + 0x74))(piVar1);
      if ((((cVar3 != '\0') && (pbVar2 = (byte *)piVar1[0x75d4], pbVar2 != (byte *)0x0)) &&
          ((*pbVar2 & 2) == 0)) && (*(int *)(pbVar2 + 0xc) != 0)) {
        cVar3 = (**(code **)(*piVar1 + 0x7c))(piVar1);
        if (cVar3 == '\0') {
          (**(code **)(*serverGameClients + 0x30))(serverGameClients,piVar1[0x75d4],local_202c);
          iVar6 = CM_PointLeafnum(local_202c);
          uVar7 = CM_LeafCluster(iVar6);
          if ((*(byte *)(iVar5 + ((int)uVar7 >> 3)) >> (uVar7 & 7) & 1) != 0) {
            cVar3 = (**(code **)(*piVar1 + 0x94))(piVar1);
            if (cVar3 == '\0') goto LAB_001fc586;
            bVar4 = (**(code **)(*(int *)piVar1[10] + 0x10))((int *)piVar1[10]);
            *(uint *)param_3 = *(uint *)param_3 | 1 << (bVar4 & 0x1f);
          }
        }
        else {
LAB_001fc586:
          *(uint *)param_3 = *(uint *)param_3 | 1 << ((byte)iVar8 & 0x1f);
        }
      }
      iVar8 = iVar8 + 1;
    } while (iVar8 < DAT_003b8080);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)