L L4D2node

CCSPlayer::PlayerRunCommand

0x0065db40 · 1087 bytes · __thiscall

_ZN9CCSPlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CCSPlayer::PlayerRunCommand(CUserCmd*, IMoveHelper*) */

void __thiscall CCSPlayer::PlayerRunCommand(CCSPlayer *this,CUserCmd *param_1,IMoveHelper *param_2)

{
  char cVar1;
  int iVar2;
  int iVar3;
  undefined4 local_8c;
  undefined4 local_88;
  undefined4 local_80;
  undefined4 local_7c;
  int local_78;
  undefined **local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined1 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined2 local_3a;
  CUserCmd local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  local_8c = 0;
  local_88 = 0;
  if (___atan2f_finite == 0) {
    local_78 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_8c,0,0,0,0,"/data/src/game/server/cstrike/cs_player.cpp",
               0x30f,&PlayerRunCommand(CUserCmd*,IMoveHelper*)::tm_fmt,"(%s)%s","Unaccounted",
               "CCSPlayer::PlayerRunCommand");
    local_78 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_80 = local_8c;
  local_7c = local_88;
                    /* try { // try from 0065dd96 to 0065dde4 has its CatchHandler @ 0065dfcf */
  if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
     (iVar3 = ThreadGetCurrentId(), iVar2 != iVar3)) {
    iVar2 = *(int *)(sv_runcmds._28_4_ + 0x30);
  }
  else {
    if ((char *)*_DAT_0105d15c != "CCSPlayer::PlayerRunCommand") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc6d637,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
    iVar2 = *(int *)(sv_runcmds._28_4_ + 0x30);
  }
  iVar3 = _DAT_0105db00;
                    /* try { // try from 0065dc18 to 0065dc1c has its CatchHandler @ 0065dfd3 */
  if ((iVar2 == 0) ||
     ((cVar1 = IsEngineThreaded(), cVar1 == '\0' &&
      (iVar3 = _DAT_0105db00,
      *(int *)(gpGlobals + 0x18) + *(int *)(sv_max_usercmd_future_ticks._28_4_ + 0x30) <
      *(int *)(param_1 + 8))))) {
    _DAT_0105db00 = iVar3;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar2 = ThreadGetCurrentId(), iVar3 == iVar2)) {
      cVar1 = CVProfNode::ExitScope();
      if (cVar1 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
    if (local_78 != 0) {
      (**(code **)(local_78 + 0x54))(local_78,local_80,local_7c,0,0,0);
    }
  }
  else {
    local_44 = 0;
    local_3c = 0;
    local_40 = 0;
    local_3a = 0;
    local_38 = (CUserCmd)0x0;
    local_34 = 0;
    local_30 = 0;
    local_2c = 0;
    local_28 = 0;
    local_24 = 0;
    local_20 = 0;
    local_74 = &PTR__CUserCmd_00c15058;
    local_70 = 0;
    local_6c = 0;
    local_68 = 0;
    local_64 = 0;
    local_60 = 0;
    local_5c = 0;
    local_58 = 0;
    local_54 = 0;
    local_50 = 0;
    local_4c = 0;
    local_48 = 0;
    if (*(int *)(this + 0x30) == 0) {
      iVar2 = 0;
    }
    else {
      iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    if (iVar2 + *(int *)(bot_mimic._28_4_ + 0x30) == 0) {
      local_70 = *(undefined4 *)(param_1 + 4);
      local_68 = *(undefined4 *)(param_1 + 0xc);
      local_64 = *(undefined4 *)(param_1 + 0x10);
      local_6c = *(undefined4 *)(param_1 + 8);
      local_60 = *(undefined4 *)(param_1 + 0x14);
      local_34 = *(undefined4 *)(param_1 + 0x40);
      local_48 = *(undefined4 *)(param_1 + 0x2c);
      local_30 = *(undefined4 *)(param_1 + 0x44);
      local_2c = *(undefined4 *)(param_1 + 0x48);
      local_44 = *(undefined4 *)(param_1 + 0x30);
      local_28 = *(undefined4 *)(param_1 + 0x4c);
      local_24 = *(undefined4 *)(param_1 + 0x50);
      local_40 = *(undefined4 *)(param_1 + 0x34);
      local_20 = *(undefined4 *)(param_1 + 0x54);
      local_3c = *(undefined2 *)(param_1 + 0x38);
      local_3a = *(undefined2 *)(param_1 + 0x3a);
      local_38 = param_1[0x3c];
      param_1 = (CUserCmd *)&local_74;
    }
                    /* try { // try from 0065dcea to 0065dd16 has its CatchHandler @ 0065dfa7 */
    cVar1 = (**(code **)(*(int *)this + 0x778))(this);
    if ((cVar1 != '\0') && (*(int *)(bot_crouch._28_4_ + 0x30) != 0)) {
      *(uint *)(param_1 + 0x24) = *(uint *)(param_1 + 0x24) | 4;
    }
    CBasePlayer::PlayerRunCommand((CBasePlayer *)this,param_1,param_2);
    iVar2 = _DAT_0105db00;
    local_74 = &PTR__CUserCmd_00c15058;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar3 = ThreadGetCurrentId(), iVar2 == iVar3)) {
      cVar1 = CVProfNode::ExitScope();
      if (cVar1 != '\0') {
        _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
      }
      DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
    }
    if (local_78 != 0) {
      (**(code **)(local_78 + 0x54))(local_78,local_80,local_7c,0,0,0);
      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)