CCSPlayer::RunPlayerMove
0x00656510 · 1434 bytes · __thiscall
_ZN9CCSPlayer13RunPlayerMoveERK6QAnglefffthf
Decompiled
undefined (8 params)
/* CCSPlayer::RunPlayerMove(QAngle const&, float, float, float, unsigned short, unsigned char,
float) */
void __thiscall
CCSPlayer::RunPlayerMove
(CCSPlayer *this,QAngle *param_1,float param_2,float param_3,float param_4,ushort param_5,
uchar param_6,float param_7)
{
CUserCmd *pCVar1;
float fVar2;
float fVar3;
CBaseEdict *this_00;
code *pcVar4;
char cVar5;
int iVar6;
int *piVar7;
undefined4 uVar8;
int iVar9;
undefined **local_124;
undefined4 local_120;
undefined4 local_11c;
undefined4 local_118;
undefined4 local_114;
undefined4 local_110;
float local_10c;
float local_108;
float local_104;
uint local_100;
CCSPlayer local_fc;
undefined4 local_f8;
undefined4 local_f4;
undefined4 local_f0;
undefined2 local_ec;
undefined2 local_ea;
CCSPlayer local_e8;
undefined4 local_e4;
undefined4 local_e0;
undefined4 local_dc;
undefined4 local_d8;
undefined4 local_d4;
undefined4 local_d0;
undefined **local_cc;
undefined4 local_c8;
undefined4 local_c4;
undefined4 local_c0;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
undefined4 local_b0;
undefined4 local_ac;
undefined4 local_a8;
CCSPlayer local_a4;
undefined4 local_a0;
undefined4 local_9c;
undefined4 local_98;
undefined2 local_94;
undefined2 local_92;
CCSPlayer local_90;
undefined4 local_8c;
undefined4 local_88;
undefined4 local_84;
undefined4 local_80;
undefined4 local_7c;
undefined4 local_78;
undefined **local_74 [25];
local_ea = 0;
local_114 = 0;
local_110 = 0;
local_10c = 0.0;
local_108 = 0.0;
local_104 = 0.0;
local_100 = 0;
local_fc = (CCSPlayer)0x0;
local_f8 = 0;
local_f4 = 0;
local_f0 = 0;
local_ec = 0;
local_e8 = (CCSPlayer)0x0;
local_e4 = 0;
local_e0 = 0;
local_dc = 0;
local_d8 = 0;
local_d4 = 0;
local_d0 = 0;
local_124 = &PTR__CUserCmd_00c15058;
fVar2 = *(float *)(gpGlobals + 0x10);
local_120 = 0;
local_11c = 0;
local_118 = 0;
fVar3 = *(float *)(gpGlobals + 0xc);
iVar9 = (int)(((fVar3 + fVar2) - param_7) / *(float *)(gpGlobals + 0x1c) + 0.5);
if (iVar9 != *(int *)(this + 0x2054)) {
if (this[0x6c] == (CCSPlayer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x2054) = iVar9;
}
local_cc = &PTR__CUserCmd_00c15058;
pCVar1 = (CUserCmd *)(this + 0x1f8c);
if (pCVar1 != (CUserCmd *)&local_cc) {
local_c8 = *(undefined4 *)(this + 0x1f90);
local_c0 = *(undefined4 *)(this + 0x1f98);
local_bc = *(undefined4 *)(this + 0x1f9c);
local_c4 = *(undefined4 *)(this + 0x1f94);
local_b8 = *(undefined4 *)(this + 0x1fa0);
local_b4 = *(undefined4 *)(this + 0x1fa4);
local_a8 = *(undefined4 *)(this + 0x1fb0);
local_b0 = *(undefined4 *)(this + 0x1fa8);
local_ac = *(undefined4 *)(this + 0x1fac);
local_a4 = this[0x1fb4];
local_8c = *(undefined4 *)(this + 0x1fcc);
local_a0 = *(undefined4 *)(this + 0x1fb8);
local_9c = *(undefined4 *)(this + 0x1fbc);
local_98 = *(undefined4 *)(this + 0x1fc0);
local_94 = *(undefined2 *)(this + 0x1fc4);
local_92 = *(undefined2 *)(this + 0x1fc6);
local_90 = this[0x1fc8];
local_88 = *(undefined4 *)(this + 0x1fd0);
local_84 = *(undefined4 *)(this + 0x1fd4);
local_80 = *(undefined4 *)(this + 0x1fd8);
local_7c = *(undefined4 *)(this + 0x1fdc);
local_78 = *(undefined4 *)(this + 0x1fe0);
}
_V_memset((CUserCmd *)&local_124,0,0x58);
cVar5 = RunMimicCommand(this,(CUserCmd *)&local_124);
if (cVar5 == '\0') {
local_100 = (uint)param_5;
local_10c = param_2;
local_108 = param_3;
local_fc = (CCSPlayer)param_6;
local_104 = param_4;
local_118 = *(undefined4 *)param_1;
local_114 = *(undefined4 *)(param_1 + 4);
local_110 = *(undefined4 *)(param_1 + 8);
local_f0 = (**(code **)(*random_valve + 8))(random_valve,0,0x7fffffff);
}
piVar7 = (int *)MoveHelperServer();
(**(code **)(*piVar7 + 4))(piVar7,this);
pcVar4 = *(code **)(*(int *)this + 0x71c);
uVar8 = MoveHelperServer();
(*pcVar4)(this,(CUserCmd *)&local_124,uVar8);
iVar6 = gpGlobals;
iVar9 = 0;
if (*(int *)(this + 0x30) != 0) {
iVar9 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
if (-iVar9 == *(int *)(bot_mimic._28_4_ + 0x30)) {
local_74[0] = &PTR__CUserCmd_00c15058;
if (pCVar1 != (CUserCmd *)local_74) {
*(undefined4 *)(this + 0x1f90) = local_120;
*(undefined4 *)(this + 0x1f94) = local_11c;
}
}
else if (pCVar1 != (CUserCmd *)&local_124) {
*(undefined4 *)(this + 0x1f98) = local_118;
*(undefined4 *)(this + 0x1f90) = local_120;
*(undefined4 *)(this + 0x1f9c) = local_114;
*(undefined4 *)(this + 0x1fa0) = local_110;
*(undefined4 *)(this + 0x1f94) = local_11c;
*(float *)(this + 0x1fa4) = local_10c;
*(float *)(this + 0x1fa8) = local_108;
*(uint *)(this + 0x1fb0) = local_100;
*(float *)(this + 0x1fac) = local_104;
this[0x1fb4] = local_fc;
*(undefined4 *)(this + 0x1fb8) = local_f8;
*(undefined4 *)(this + 0x1fbc) = local_f4;
*(undefined4 *)(this + 0x1fc0) = local_f0;
*(undefined2 *)(this + 0x1fc4) = local_ec;
*(undefined2 *)(this + 0x1fc6) = local_ea;
this[0x1fc8] = local_e8;
*(undefined4 *)(this + 0x1fcc) = local_e4;
*(undefined4 *)(this + 0x1fd0) = local_e0;
*(undefined4 *)(this + 0x1fd4) = local_dc;
*(undefined4 *)(this + 0x1fd8) = local_d8;
*(undefined4 *)(this + 0x1fdc) = local_d4;
*(undefined4 *)(this + 0x1fe0) = local_d0;
}
*(undefined4 *)(this + 0x1c94) = 0;
*(float *)(iVar6 + 0x10) = fVar2;
*(float *)(iVar6 + 0xc) = fVar3;
piVar7 = (int *)MoveHelperServer();
(**(code **)(*piVar7 + 4))(piVar7,0);
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.