L L4D2node

CHLTVServer::BroadcastEventLocal

0x001711f0 · 582 bytes · __thiscall

_ZN11CHLTVServer19BroadcastEventLocalEP10IGameEventb

Decompiled

undefined (3 params)

/* CHLTVServer::BroadcastEventLocal(IGameEvent*, bool) */

void __thiscall CHLTVServer::BroadcastEventLocal(CHLTVServer *this,IGameEvent *param_1,bool param_2)

{
  int *piVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  int in_GS_OFFSET;
  undefined **local_4ac;
  char local_4a8;
  undefined4 local_4a4;
  undefined4 local_4a0;
  undefined4 local_49c;
  undefined8 local_498;
  undefined4 local_490;
  undefined4 local_48c;
  undefined8 local_488;
  undefined4 local_480;
  undefined4 local_47c;
  undefined1 local_478;
  undefined8 local_474;
  undefined4 local_46c;
  undefined4 local_468;
  undefined4 local_45c;
  undefined1 local_458;
  undefined4 local_454;
  undefined4 local_450;
  bf_write local_438 [24];
  undefined1 local_420 [1024];
  int local_20;
  
  local_498 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_488 = 0;
  local_474 = 0;
  local_4a0 = 0;
  local_49c = 0;
  local_490 = 0;
  local_48c = 0;
  local_480 = 0;
  local_47c = 0;
  local_478 = 0;
  local_46c = 0;
  local_468 = 0;
  local_4a8 = 1;
  local_4a4 = 0;
  local_4ac = &PTR__SVC_GameEvent_002a1f48;
  local_458 = 0;
  local_45c = 0;
  local_454 = 0xffffffff;
  local_450 = 0;
  bf_write::bf_write(local_438);
  local_4a8 = param_2;
  bf_write::StartWriting(local_438,local_420,0x400,0,-1);
  cVar2 = (**(code **)(s_GameEventManager + 0x30))(&s_GameEventManager,param_1,local_438);
  if (cVar2 == '\0') {
    uVar3 = (**(code **)(*(int *)param_1 + 8))(param_1);
    DevMsg("CHLTVServer: failed to serialize local event \'%s\'.\n",uVar3);
  }
  else {
    iVar4 = 0;
    if (0 < *(int *)(this + 0x124)) {
      do {
        while( true ) {
          piVar1 = *(int **)(*(int *)(this + 0x118) + iVar4 * 4);
          cVar2 = (**(code **)(*piVar1 + 0x74))(piVar1);
          if ((((cVar2 != '\0') && (cVar2 = (**(code **)(*piVar1 + 0x70))(piVar1), cVar2 != '\0'))
              && (cVar2 = (**(code **)(*piVar1 + 0x7c))(piVar1), cVar2 == '\0')) &&
             ((cVar2 = (**(code **)(*piVar1 + 100))(piVar1,&local_4ac,0,0), cVar2 == '\0' &&
              (local_4a8 != '\0')))) break;
          iVar4 = iVar4 + 1;
          if (*(int *)(this + 0x124) <= iVar4) goto LAB_001713d0;
        }
        iVar4 = iVar4 + 1;
        uVar3 = (**(code **)(*piVar1 + 0x1c))(piVar1);
        DevMsg("BroadcastMessage: Reliable broadcast message overflow for client %s",uVar3);
      } while (iVar4 < *(int *)(this + 0x124));
    }
LAB_001713d0:
    if (*(int *)(tv_debug._28_4_ + 0x30) != 0) {
      uVar3 = (**(code **)(*(int *)param_1 + 8))(param_1);
      Msg("SourceTV broadcast local event: %s\n",uVar3);
    }
  }
  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)