L L4D2node

CHLTVClientState::SendPacket

0x0016a800 · 399 bytes · __thiscall

_ZN16CHLTVClientState10SendPacketEv

Decompiled

undefined (1 param)

/* CHLTVClientState::SendPacket() */

void __thiscall CHLTVClientState::SendPacket(CHLTVClientState *this)

{
  char cVar1;
  float fVar2;
  float fVar3;
  double dVar4;
  double dVar5;
  undefined **local_64;
  undefined1 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined8 local_50;
  undefined4 local_48;
  undefined4 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined4 local_34;
  undefined1 local_30;
  undefined8 local_2c;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  if ((1 < *(int *)(this + 0x60)) && (*(double *)(this + 100) <= net_time)) {
    cVar1 = (**(code **)(**(int **)(this + 0x10) + 0xe8))(*(int **)(this + 0x10));
    if (cVar1 != '\0') {
      if (*(int *)(this + 0x60) == 6) {
        local_18 = *(undefined4 *)(this + 0xc0);
        local_50 = 0;
        local_40 = 0;
        local_2c = 0;
        local_58 = 0;
        local_14 = host_frametime_unbounded;
        local_54 = 0;
        local_48 = 0;
        local_44 = 0;
        local_38 = 0;
        local_34 = 0;
        local_30 = 0;
        local_24 = 0;
        local_20 = 0;
        local_5c = 0;
        local_64 = &PTR__NET_Tick_002a1b28;
        local_60 = 0;
        local_10 = host_frametime_stddeviation;
        (**(code **)(**(int **)(this + 0x10) + 0xa8))(*(int **)(this + 0x10),&local_64,0,0);
      }
      (**(code **)(**(int **)(this + 0x10) + 0xc0))(*(int **)(this + 0x10),0);
      if (*(int *)(this + 0x60) != 6) {
        *(double *)(this + 100) = net_time + 0.20000000298023224;
        return;
      }
      dVar5 = net_time - *(double *)(this + 100);
      fVar2 = 0.6666667 / (float)*(int *)(tv_snapshotrate._28_4_ + 0x30);
      fVar3 = DAT_003a1730;
      if (fVar2 <= DAT_003a1730) {
        fVar3 = fVar2;
      }
      dVar4 = (double)fVar3;
      if (dVar5 <= dVar4) {
        if (dVar5 <= 0.0) {
          dVar5 = 0.0;
        }
        dVar4 = (double)(float)dVar5;
      }
      *(double *)(this + 100) = ((double)fVar2 + net_time) - dVar4;
      return;
    }
  }
  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)