L L4D2node

CBaseClientState::SendReserveServerChallenge

0x00102a90 · 208 bytes · __thiscall

_ZN16CBaseClientState26SendReserveServerChallengeEv

Decompiled

undefined (1 param)

/* CBaseClientState::SendReserveServerChallenge() */

void __thiscall CBaseClientState::SendReserveServerChallenge(CBaseClientState *this)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  float fVar5;
  
  iVar4 = 0;
  iVar3 = 0;
  if (0 < *(int *)(this + 0x180)) {
    do {
      fVar5 = *(float *)(cl_resend._28_4_ + 0x2c) * 0.5;
      if (fVar5 <= 0.0) {
        fVar5 = 0.0;
      }
      if (1.0 <= fVar5) {
        fVar5 = 1.0;
      }
      uVar1 = (uint)(2.1474836e+09 <= fVar5 * 1000.0);
      uVar1 = ((int)(fVar5 * 1000.0 - (float)(-uVar1 & 0x4f000000)) ^ uVar1 * -0x80000000) * iVar3;
      iVar3 = iVar3 + 1;
      iVar2 = *(int *)(this + 0x174) + iVar4;
      iVar4 = iVar4 + 0x2c;
      NET_OutOfBandDelayedPrintf
                (*(int *)(this + 0xc),(netadr_s *)(iVar2 + 0x20),uVar1,"%creserve0000000",0x71);
    } while (iVar3 < *(int *)(this + 0x180));
  }
  *(undefined8 *)(this + 0x168) = net_time;
  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)