L L4D2node

CBaseClient::UpdateAcknowledgedFramecount

0x000f9d50 · 322 bytes · __thiscall

_ZN11CBaseClient28UpdateAcknowledgedFramecountEi

Decompiled

undefined (2 params)

/* CBaseClient::UpdateAcknowledgedFramecount(int) */

undefined4 __thiscall CBaseClient::UpdateAcknowledgedFramecount(CBaseClient *this,int param_1)

{
  int iVar1;
  char cVar2;
  undefined4 uVar3;
  
  uVar3 = (**(code **)(*(int *)this + 0x78))(this);
  if ((char)uVar3 != '\0') {
    *(int *)(this + 0xf0) = param_1;
    *(int *)(this + 0xf4) = param_1;
    return uVar3;
  }
  iVar1 = *(int *)(this + 0x210);
  if (iVar1 < 1) {
    if (*(int *)(this + 0xf0) == -1) {
      return 1;
    }
    if (param_1 == -1) {
      OnRequestFullUpdate(this,"client ack\'d -1");
      *(undefined4 *)(this + 0xf0) = 0xffffffff;
      goto LAB_000f9e18;
    }
    if (param_1 < *(int *)(this + 0xf0)) {
      (**(code **)(*(int *)this + 0x3c))(this,"Client delta ticks out of order.\n");
      return uVar3;
    }
  }
  else {
    if (iVar1 < param_1) {
      return 1;
    }
    if (param_1 == -1) {
      cVar2 = (**(code **)(**(int **)(this + 0xe8) + 0xf4))(*(int **)(this + 0xe8));
      if (cVar2 == '\0') {
        ConDMsg("Client forced immediate full update.\n");
        *(undefined4 *)(this + 0xf0) = 0xffffffff;
        *(undefined4 *)(this + 0x210) = 0xffffffff;
        OnRequestFullUpdate(this,"forced immediate full update");
        return 1;
      }
      *(undefined4 *)(this + 0xf0) = 0xffffffff;
      goto LAB_000f9e18;
    }
    if (param_1 < iVar1) {
      return 1;
    }
    *(undefined4 *)(this + 0x210) = 0xffffffff;
  }
  *(int *)(this + 0xf0) = param_1;
  if (-1 < param_1) {
    *(int *)(this + 0xf4) = param_1;
  }
LAB_000f9e18:
  if ((-1 < *(int *)(this + 0x108)) && (*(int *)(this + 0x108) < param_1)) {
    *(undefined4 *)(this + 0x108) = 0xffffffff;
    return 1;
  }
  return 1;
}

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)