CPlayerMove::CheckMovingGround
0x007c7980 · 1014 bytes · __thiscall
_ZN11CPlayerMove17CheckMovingGroundEP11CBasePlayerd
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CPlayerMove::CheckMovingGround(CBasePlayer*, double) */
void __thiscall
CPlayerMove::CheckMovingGround(CPlayerMove *this,CBasePlayer *param_1,double param_2)
{
float fVar1;
int iVar2;
float fVar3;
float fVar4;
char cVar5;
uint uVar6;
int *piVar7;
int iVar8;
float fVar9;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
float local_28;
float local_24;
float local_20;
local_3c = 0;
local_38 = 0;
if (___atan2f_finite == 0) {
local_2c = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/player_command.cpp",0x5c,
&CheckMovingGround(CBasePlayer*,double)::tm_fmt,"(%s)%s","Unaccounted",
"CPlayerMove::CheckMovingGround()");
local_2c = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_34 = local_3c;
local_30 = local_38;
/* try { // try from 007c7b66 to 007c7bb4 has its CatchHandler @ 007c7da3 */
if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
(iVar8 = ThreadGetCurrentId(), iVar2 != iVar8)) {
uVar6 = *(uint *)(param_1 + 0x150);
}
else {
if ((char *)*_DAT_0105d15c != "CPlayerMove::CheckMovingGround()") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcbc5bc,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
uVar6 = *(uint *)(param_1 + 0x150);
}
if ((uVar6 & 1) != 0) {
/* try { // try from 007c7bcd to 007c7c5b has its CatchHandler @ 007c7db8 */
piVar7 = (int *)CBaseEntity::GetGroundEntity((CBaseEntity *)param_1);
if ((piVar7 != (int *)0x0) && ((*(byte *)((int)piVar7 + 0x151) & 0x10) != 0)) {
(**(code **)(*piVar7 + 0x27c))(piVar7,&local_28);
if (((byte)param_1[0x152] & 0x80) == 0) {
fVar9 = *(float *)(param_1 + 0x268);
}
else {
fVar9 = *(float *)(param_1 + 0x268);
local_28 = local_28 + fVar9;
local_24 = *(float *)(param_1 + 0x26c) + local_24;
local_20 = *(float *)(param_1 + 0x270) + local_20;
}
fVar4 = local_20;
fVar3 = local_24;
fVar1 = local_28;
if (((fVar9 != local_28) || (local_24 != *(float *)(param_1 + 0x26c))) ||
(local_20 != *(float *)(param_1 + 0x270))) {
(**(code **)(*(int *)param_1 + 0x2fc))(param_1,param_1 + 0x268);
*(float *)(param_1 + 0x26c) = fVar3;
*(float *)(param_1 + 0x270) = fVar4;
*(float *)(param_1 + 0x268) = fVar1;
}
CBaseEntity::AddFlag((CBaseEntity *)param_1,0x800000);
}
uVar6 = *(uint *)(param_1 + 0x150);
}
if ((uVar6 & 0x800000) == 0) {
local_20 = (float)(param_2 * 0.5 + 1.0);
local_28 = *(float *)(param_1 + 0x268) * local_20;
local_24 = *(float *)(param_1 + 0x26c) * local_20;
local_20 = local_20 * *(float *)(param_1 + 0x270);
/* try { // try from 007c7aad to 007c7b00 has its CatchHandler @ 007c7db8 */
CBaseEntity::ApplyAbsVelocityImpulse((CBaseEntity *)param_1,(Vector *)&local_28);
if (((vec3_origin != *(float *)(param_1 + 0x268)) ||
(DAT_01053d4c != *(float *)(param_1 + 0x26c))) ||
(DAT_01053d50 != *(float *)(param_1 + 0x270))) {
/* try { // try from 007c7cd7 to 007c7d84 has its CatchHandler @ 007c7db8 */
(**(code **)(*(int *)param_1 + 0x2fc))(param_1,param_1 + 0x268);
fVar1 = DAT_01053d50;
fVar9 = DAT_01053d4c;
*(float *)(param_1 + 0x268) = vec3_origin;
*(float *)(param_1 + 0x26c) = fVar9;
*(float *)(param_1 + 0x270) = fVar1;
}
}
CBaseEntity::RemoveFlag((CBaseEntity *)param_1,0x800000);
iVar2 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar8 = ThreadGetCurrentId(), iVar2 == iVar8)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,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.