L L4D2node

CGameClient::ProcessMove

0x001ea4f0 · 406 bytes · __thiscall

_ZN11CGameClient11ProcessMoveEP8CLC_Move

Decompiled

undefined (2 params)

/* CGameClient::ProcessMove(CLC_Move*) */

undefined4 __thiscall CGameClient::ProcessMove(CGameClient *this,CLC_Move *param_1)

{
  int iVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  bool bVar7;
  longdouble lVar8;
  
  cVar3 = (**(code **)(*(int *)this + 0x74))(this);
  if ((cVar3 != '\0') && (*(int *)(this + 0x1d748) != DAT_003b7f6c)) {
    *(int *)(this + 0x1d748) = DAT_003b7f6c;
    iVar4 = CBaseServer::GetBaseUserForSplitClient((CBaseServer *)&sv,(CBaseClient *)this);
    iVar6 = *(int *)(param_1 + 0x4c);
    iVar1 = *(int *)(param_1 + 0x50);
    uVar5 = (**(code **)(**(int **)(iVar4 + 0xe8) + 0xd0))(*(int **)(iVar4 + 0xe8));
    bVar2 = DAT_003b7f64 < 2;
    bVar7 = DAT_003b7f64 == 3;
    lVar8 = (longdouble)CBaseServer::GetTime((CBaseServer *)&sv);
    g_ServerGlobalVariables._12_4_ = (undefined4)lVar8;
    g_ServerGlobalVariables._16_4_ = DAT_003a1730;
    if (*(int *)(param_1 + 0x78) == 0) {
      iVar4 = 0;
    }
    else {
      iVar4 = (((uint)(*(int *)(param_1 + 0x70) - *(int *)(param_1 + 0x78)) >> 2) * 0x20 -
              *(int *)(param_1 + 0x6c)) + (*(uint *)(param_1 + 100) & 3) * 8;
      if (*(int *)(param_1 + 0x60) < iVar4) {
        iVar4 = *(int *)(param_1 + 0x60);
      }
    }
    (**(code **)(*serverGameClients + 0x24))
              (serverGameClients,*(undefined4 *)(this + 0x1d750),param_1 + 0x58,
               *(undefined4 *)(param_1 + 0x50),iVar6 + iVar1,uVar5,bVar2,bVar7);
    if (param_1[0x5c] != (CLC_Move)0x0) {
      (**(code **)(*(int *)this + 0x3c))
                (this,
                 "ProcessUsercmds:  Overflowed reading usercmd data (check sending and receiving code for mismatches)!\n"
                );
      return 0;
    }
    if (*(int *)(param_1 + 0x78) == 0) {
      iVar6 = 0;
    }
    else {
      iVar1 = (((uint)(*(int *)(param_1 + 0x70) - *(int *)(param_1 + 0x78)) >> 2) * 0x20 -
              *(int *)(param_1 + 0x6c)) + (*(uint *)(param_1 + 100) & 3) * 8;
      iVar6 = *(int *)(param_1 + 0x60);
      if (iVar1 <= *(int *)(param_1 + 0x60)) {
        iVar6 = iVar1;
      }
    }
    if (*(int *)(param_1 + 0x54) != iVar6 - iVar4) {
      (**(code **)(*(int *)this + 0x3c))
                (this,
                 "ProcessUsercmds:  Incorrect reading frame (check sending and receiving code for mismatches)!\n"
                );
      return 0;
    }
  }
  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)