L L4D2node

NET_SleepUntilMessages

0x001c52f0 · 158 bytes · __cdecl

_Z22NET_SleepUntilMessagesi

Decompiled

undefined (1 param)

/* NET_SleepUntilMessages(int) */

void NET_SleepUntilMessages(int param_1)

{
  uint uVar1;
  int iVar2;
  __fd_mask *p_Var3;
  timeval local_94;
  fd_set local_8c;
  
  iVar2 = 0x20;
  p_Var3 = local_8c.fds_bits;
  for (; iVar2 != 0; iVar2 = iVar2 + -1) {
    *p_Var3 = 0;
    p_Var3 = p_Var3 + 1;
  }
  uVar1 = *(uint *)(net_sockets + 0x18);
  if (uVar1 != 0) {
    local_8c.fds_bits[uVar1 >> 5] = local_8c.fds_bits[uVar1 >> 5] | 1 << ((byte)uVar1 & 0x1f);
    local_94.tv_sec = 0;
    local_94.tv_usec = param_1 * 1000;
    select(uVar1 + 1,&local_8c,(fd_set *)0x0,(fd_set *)0x0,&local_94);
    return;
  }
  Sys_Sleep(param_1);
  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)