CCSPlayer::RunMimicCommand
0x006562d0 · 559 bytes · __thiscall
_ZN9CCSPlayer15RunMimicCommandER8CUserCmd
Decompiled
undefined (2 params)
/* CCSPlayer::RunMimicCommand(CUserCmd&) */
undefined4 __thiscall CCSPlayer::RunMimicCommand(CCSPlayer *this,CUserCmd *param_1)
{
byte *pbVar1;
undefined4 uVar2;
code *pcVar3;
undefined4 uVar4;
int iVar5;
int *piVar6;
undefined4 uVar7;
byte *pbVar8;
uint uVar9;
float fVar10;
uVar4 = (**(code **)(*(int *)this + 0x778))(this);
if ((((char)uVar4 == '\0') ||
(uVar9 = *(int *)(bot_mimic._28_4_ + 0x30) >> 0x1f,
iVar5 = (*(uint *)(bot_mimic._28_4_ + 0x30) ^ uVar9) - uVar9,
*(int *)(gpGlobals + 0x14) < iVar5)) || (iVar5 = UTIL_PlayerByIndex(iVar5), iVar5 == 0)) {
return 0;
}
if (param_1 == (CUserCmd *)(iVar5 + 0x1f8c)) {
fVar10 = *(float *)(iVar5 + 0x1f9c);
uVar9 = *(uint *)(iVar5 + 0x1fb8);
}
else {
*(undefined4 *)(param_1 + 4) = *(undefined4 *)(iVar5 + 0x1f90);
*(undefined4 *)(param_1 + 8) = *(undefined4 *)(iVar5 + 0x1f94);
*(undefined4 *)(param_1 + 0xc) = *(undefined4 *)(iVar5 + 0x1f98);
fVar10 = *(float *)(iVar5 + 0x1f9c);
*(float *)(param_1 + 0x10) = fVar10;
*(undefined4 *)(param_1 + 0x14) = *(undefined4 *)(iVar5 + 0x1fa0);
*(undefined4 *)(param_1 + 0x18) = *(undefined4 *)(iVar5 + 0x1fa4);
*(undefined4 *)(param_1 + 0x1c) = *(undefined4 *)(iVar5 + 0x1fa8);
*(undefined4 *)(param_1 + 0x20) = *(undefined4 *)(iVar5 + 0x1fac);
*(undefined4 *)(param_1 + 0x24) = *(undefined4 *)(iVar5 + 0x1fb0);
param_1[0x28] = *(CUserCmd *)(iVar5 + 0x1fb4);
uVar9 = *(uint *)(iVar5 + 0x1fb8);
*(uint *)(param_1 + 0x2c) = uVar9;
*(undefined4 *)(param_1 + 0x30) = *(undefined4 *)(iVar5 + 0x1fbc);
*(undefined4 *)(param_1 + 0x34) = *(undefined4 *)(iVar5 + 0x1fc0);
*(undefined2 *)(param_1 + 0x38) = *(undefined2 *)(iVar5 + 0x1fc4);
*(undefined2 *)(param_1 + 0x3a) = *(undefined2 *)(iVar5 + 0x1fc6);
param_1[0x3c] = *(CUserCmd *)(iVar5 + 0x1fc8);
*(undefined4 *)(param_1 + 0x40) = *(undefined4 *)(iVar5 + 0x1fcc);
*(undefined4 *)(param_1 + 0x44) = *(undefined4 *)(iVar5 + 0x1fd0);
*(undefined4 *)(param_1 + 0x48) = *(undefined4 *)(iVar5 + 0x1fd4);
*(undefined4 *)(param_1 + 0x4c) = *(undefined4 *)(iVar5 + 0x1fd8);
*(undefined4 *)(param_1 + 0x50) = *(undefined4 *)(iVar5 + 0x1fdc);
*(undefined4 *)(param_1 + 0x54) = *(undefined4 *)(iVar5 + 0x1fe0);
}
*(float *)(param_1 + 0x10) = fVar10 + *(float *)(bot_mimic_yaw_offset._28_4_ + 0x2c);
if (uVar9 == 0) goto LAB_00656449;
pbVar1 = *(byte **)(gpGlobals + 0x58);
if (uVar9 < 0x800) {
if (pbVar1 == (byte *)0x0) goto LAB_00656449;
pbVar8 = pbVar1 + uVar9 * 0x10;
if ((pbVar1[uVar9 * 0x10] & 2) != 0) goto LAB_00656500;
}
else {
if (pbVar1 == (byte *)0x0) goto LAB_00656449;
LAB_00656500:
pbVar8 = pbVar1;
if ((*pbVar1 & 2) != 0) goto LAB_00656449;
}
piVar6 = *(int **)(pbVar8 + 0xc);
if (((piVar6 != (int *)0x0) && (iVar5 = (**(code **)(*piVar6 + 0x18))(piVar6), iVar5 != 0)) &&
(piVar6 = (int *)__dynamic_cast(iVar5,&CBaseEntity::typeinfo,&CBaseCombatWeapon::typeinfo,0),
piVar6 != (int *)0x0)) {
uVar2 = *(undefined4 *)(param_1 + 0x30);
pcVar3 = *(code **)(*(int *)this + 0x6b4);
uVar7 = (**(code **)(*piVar6 + 0x538))(piVar6);
(*pcVar3)(this,uVar7,uVar2);
}
LAB_00656449:
*(undefined4 *)(this + 0x1c94) = 0;
return uVar4;
}
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.