L L4D2node

CBasePlayer::RunNullCommand

0x007ad650 · 699 bytes · __thiscall

_ZN11CBasePlayer14RunNullCommandEv

Decompiled

undefined (1 param)

/* CBasePlayer::RunNullCommand() */

void __thiscall CBasePlayer::RunNullCommand(CBasePlayer *this)

{
  undefined4 uVar1;
  undefined4 uVar2;
  CBaseEdict *this_00;
  code *pcVar3;
  undefined4 *puVar4;
  int iVar5;
  int *piVar6;
  undefined4 uVar7;
  int iVar8;
  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;
  CBasePlayer local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined2 local_3c;
  undefined2 local_3a;
  CBasePlayer local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  local_3c = 0;
  local_3a = 0;
  local_64 = 0;
  local_60 = 0;
  local_5c = 0;
  local_58 = 0;
  local_54 = 0;
  local_50 = 0;
  local_4c = (CBasePlayer)0x0;
  local_48 = 0;
  local_44 = 0;
  local_40 = 0;
  local_38 = (CBasePlayer)0x0;
  local_34 = 0;
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = 0;
  local_68 = 0;
  uVar1 = *(undefined4 *)(gpGlobals + 0x10);
  uVar2 = *(undefined4 *)(gpGlobals + 0xc);
  local_74 = &PTR__CUserCmd_00c15058;
  local_70 = 0;
  local_6c = 0;
  *(undefined4 *)(this + 0x1c94) = 0;
  puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0x238))(this);
  local_68 = *puVar4;
  local_64 = puVar4[1];
  local_60 = puVar4[2];
  iVar8 = (int)(*(float *)(gpGlobals + 0xc) / *(float *)(gpGlobals + 0x1c) + 0.5);
  if (iVar8 != *(int *)(this + 0x2054)) {
    if (this[0x6c] == (CBasePlayer)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x2054) = iVar8;
  }
  piVar6 = (int *)MoveHelperServer();
  (**(code **)(*piVar6 + 4))(piVar6,this);
  pcVar3 = *(code **)(*(int *)this + 0x71c);
  uVar7 = MoveHelperServer();
  (*pcVar3)(this,(CBasePlayer *)&local_74,uVar7);
  if ((CBasePlayer *)&local_74 != this + 0x1f8c) {
    *(undefined4 *)(this + 0x1f98) = local_68;
    *(undefined4 *)(this + 0x1f90) = local_70;
    *(undefined4 *)(this + 0x1f9c) = local_64;
    *(undefined4 *)(this + 0x1fa0) = local_60;
    *(undefined4 *)(this + 0x1f94) = local_6c;
    *(undefined4 *)(this + 0x1fa4) = local_5c;
    *(undefined4 *)(this + 0x1fa8) = local_58;
    *(undefined4 *)(this + 0x1fb0) = local_50;
    *(undefined4 *)(this + 0x1fac) = local_54;
    this[0x1fb4] = local_4c;
    *(undefined4 *)(this + 0x1fb8) = local_48;
    *(undefined4 *)(this + 0x1fbc) = local_44;
    *(undefined4 *)(this + 0x1fc0) = local_40;
    *(undefined2 *)(this + 0x1fc4) = local_3c;
    *(undefined2 *)(this + 0x1fc6) = local_3a;
    this[0x1fc8] = local_38;
    *(undefined4 *)(this + 0x1fcc) = local_34;
    *(undefined4 *)(this + 0x1fd0) = local_30;
    *(undefined4 *)(this + 0x1fd4) = local_2c;
    *(undefined4 *)(this + 0x1fd8) = local_28;
    *(undefined4 *)(this + 0x1fdc) = local_24;
    *(undefined4 *)(this + 0x1fe0) = local_20;
  }
  iVar8 = gpGlobals;
  *(undefined4 *)(gpGlobals + 0x10) = uVar1;
  *(undefined4 *)(iVar8 + 0xc) = uVar2;
  piVar6 = (int *)MoveHelperServer();
  (**(code **)(*piVar6 + 4))(piVar6,0);
  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)