L L4D2node

CBaseClient::UpdateSendState

0x000f8300 · 364 bytes · __thiscall

_ZN11CBaseClient15UpdateSendStateEv

Decompiled

undefined (1 param)

/* CBaseClient::UpdateSendState() */

void __thiscall CBaseClient::UpdateSendState(CBaseClient *this)

{
  int *piVar1;
  char cVar2;
  longdouble lVar3;
  float fVar4;
  float fVar5;
  double dVar6;
  double dVar7;
  
  this[0x215] = (CBaseClient)0x0;
  cVar2 = (**(code **)(**(int **)(this + 0xb8) + 0x68))(*(int **)(this + 0xb8));
  dVar6 = net_time;
  if ((cVar2 == '\0') && (*(float *)(host_limitlocal._28_4_ + 0x2c) == 0.0)) {
    this[0x215] = (CBaseClient)0x1;
    *(double *)(this + 0x218) = dVar6;
  }
  else {
    cVar2 = (**(code **)(*(int *)this + 0x74))(this);
    if (cVar2 != '\0') {
      lVar3 = (longdouble)(**(code **)(**(int **)(this + 0xb8) + 0x30))(*(int **)(this + 0xb8));
      fVar5 = *(float *)(this + 0x220);
      fVar4 = fVar5;
      if ((float)lVar3 < fVar5) {
        lVar3 = (longdouble)(**(code **)(**(int **)(this + 0xb8) + 0x30))(*(int **)(this + 0xb8));
        fVar4 = *(float *)(this + 0x220);
        fVar5 = (float)lVar3;
      }
      dVar6 = (double)fVar5;
      dVar7 = net_time - *(double *)(this + 0x218);
      if (dVar7 <= dVar6) {
        if (dVar7 <= 0.0) {
          dVar7 = 0.0;
        }
        dVar6 = (double)(float)dVar7;
      }
      *(double *)(this + 0x218) = ((double)fVar4 + net_time) - dVar6;
      return;
    }
    piVar1 = *(int **)(this + 0xe8);
    if (((piVar1 == (int *)0x0) || (cVar2 = (**(code **)(*piVar1 + 0xf4))(piVar1), cVar2 == '\0'))
       || (lVar3 = (longdouble)(**(code **)(**(int **)(this + 0xe8) + 0x58))(*(int **)(this + 0xe8))
          , 1.0 <= (float)lVar3)) {
      *(double *)(this + 0x218) = net_time + 1.0;
      return;
    }
    *(double *)(this + 0x218) = 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)