CBasePlayer::PlayerRunCommand
0x007a7850 · 293 bytes · __thiscall
_ZN11CBasePlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper
Decompiled
undefined (3 params)
/* CBasePlayer::PlayerRunCommand(CUserCmd*, IMoveHelper*) */
void __thiscall
CBasePlayer::PlayerRunCommand(CBasePlayer *this,CUserCmd *param_1,IMoveHelper *param_2)
{
int *piVar1;
this[0x1df8] = (CBasePlayer)0x0;
if (*(int *)(this + 0x1c94) == 0) {
*(undefined4 *)(this + 0x1c84) = *(undefined4 *)(param_1 + 0xc);
*(undefined4 *)(this + 0x1c88) = *(undefined4 *)(param_1 + 0x10);
*(undefined4 *)(this + 0x1c8c) = *(undefined4 *)(param_1 + 0x14);
}
if ((((byte)this[0x150] & 0x20) != 0) ||
(((*(int *)(developer._28_4_ + 0x30) == 0 && (*(int *)(gpGlobals + 0x48) == 0)) &&
(*(float *)(gpGlobals + 0xc) <= 3.0 && *(float *)(gpGlobals + 0xc) != 3.0)))) {
*(undefined4 *)(param_1 + 0x18) = 0;
*(undefined4 *)(param_1 + 0x1c) = 0;
*(undefined4 *)(param_1 + 0x20) = 0;
*(undefined4 *)(param_1 + 0x24) = 0;
param_1[0x28] = (CUserCmd)0x0;
*(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(this + 0x1c84);
*(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(this + 0x1c88);
*(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(this + 0x1c8c);
}
else if (this[0x2034] != (CBasePlayer)0x0) {
if (*(int *)(xc_crouch_debounce._28_4_ + 0x30) == 0) {
*(uint *)(param_1 + 0x24) = *(uint *)(param_1 + 0x24) | 4;
}
else {
this[0x2034] = (CBasePlayer)0x0;
ConVar::SetValue(0xfedf00);
}
}
piVar1 = (int *)PlayerMove();
(**(code **)(*piVar1 + 8))(piVar1,this,param_1,param_2);
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.