CGameMovement::CheckWaterJump
0x004528b0 · 1218 bytes · __thiscall
_ZN13CGameMovement14CheckWaterJumpEv
Decompiled
undefined (1 param)
/* CGameMovement::CheckWaterJump() */
void __thiscall CGameMovement::CheckWaterJump(CGameMovement *this)
{
float fVar1;
int iVar2;
code *pcVar3;
int *piVar4;
float *pfVar5;
float *pfVar6;
undefined4 uVar7;
uint uVar8;
int iVar9;
longdouble lVar10;
float fVar11;
float local_a0;
float local_9c;
float local_98;
float local_94;
float local_90;
float local_8c;
float local_88;
float local_84;
float local_80;
float local_7c;
float local_78;
float local_74;
undefined1 local_70 [24];
float local_58;
float local_54;
float local_50;
float local_44;
int local_24;
fVar11 = *(float *)(this + 0x18);
fVar1 = *(float *)(this + 0x1c);
if ((*(float *)(*(int *)(this + 4) + 0x2010) == 0.0) &&
(iVar2 = *(int *)(this + 8),
-180.0 < *(float *)(iVar2 + 0x48) || *(float *)(iVar2 + 0x48) == -180.0)) {
local_94 = *(float *)(iVar2 + 0x40);
local_90 = *(float *)(iVar2 + 0x44);
local_8c = 0.0;
lVar10 = (longdouble)VectorNormalize((Vector *)&local_94);
local_98 = 0.0;
local_a0 = fVar11;
local_9c = fVar1;
VectorNormalize((Vector *)&local_a0);
if (((float)lVar10 == 0.0) ||
(0.0 <= local_9c * local_90 + local_a0 * local_94 + local_98 * local_8c)) {
pfVar5 = (float *)(**(code **)(*(int *)this + 0x80))(this);
pfVar6 = (float *)(**(code **)(*(int *)this + 0x7c))(this);
iVar2 = *(int *)(this + 8);
local_88 = (*pfVar5 + *pfVar6) * 0.5 + *(float *)(iVar2 + 0x9c);
local_84 = (pfVar5[1] + pfVar6[1]) * 0.5 + *(float *)(iVar2 + 0xa0);
local_80 = (pfVar5[2] + pfVar6[2]) * 0.5 + *(float *)(iVar2 + 0xa4);
pcVar3 = *(code **)(*(int *)this + 0x3c);
local_7c = local_a0 * 24.0 + local_88;
local_78 = local_9c * 24.0 + local_84;
local_74 = local_98 * 24.0 + local_80;
uVar7 = (**(code **)(*(int *)this + 0x40))(this,0,0);
(*pcVar3)(this,&local_88,&local_7c,uVar7,8,local_70);
if (local_44 < 1.0) {
piVar4 = *(int **)(local_24 + 0x238);
if ((piVar4 != (int *)0x0) &&
(uVar8 = (**(code **)(*piVar4 + 0x50))(piVar4), (uVar8 & 4) != 0)) {
return;
}
fVar11 = *(float *)(*(int *)(this + 8) + 0xa4);
iVar9 = (**(code **)(**(int **)(this + 4) + 0x250))(*(int **)(this + 4));
iVar2 = *(int *)(this + 4);
local_7c = local_a0 * 24.0 + local_88;
local_80 = fVar11 + *(float *)(iVar9 + 8) + 8.0;
local_78 = local_9c * 24.0 + local_84;
local_74 = local_98 * 24.0 + local_80;
*(float *)(iVar2 + 0x2014) = local_58 * -50.0 + vec3_origin;
fVar11 = local_50 * -50.0 + DAT_01053d50;
*(float *)(iVar2 + 0x2018) = local_54 * -50.0 + DAT_01053d4c;
*(float *)(iVar2 + 0x201c) = fVar11;
pcVar3 = *(code **)(*(int *)this + 0x3c);
uVar7 = (**(code **)(*(int *)this + 0x40))(this,0,0);
(*pcVar3)(this,&local_88,&local_7c,uVar7,8,local_70);
if (local_44 == 1.0) {
local_88 = local_7c;
local_84 = local_78;
pcVar3 = *(code **)(*(int *)this + 0x3c);
local_80 = local_74;
local_74 = local_74 - 1024.0;
uVar7 = (**(code **)(*(int *)this + 0x40))(this,0,0);
(*pcVar3)(this,&local_88,&local_7c,uVar7,8,local_70);
if ((local_44 < 1.0) &&
(lVar10 = (longdouble)(**(code **)(*(int *)this + 0x38))(this),
(float)lVar10 <= local_50)) {
*(undefined4 *)(*(int *)(this + 8) + 0x48) = 0x43800000;
*(uint *)(*(int *)(this + 8) + 0x28) = *(uint *)(*(int *)(this + 8) + 0x28) | 2;
CBaseEntity::AddFlag(*(CBaseEntity **)(this + 4),4);
*(undefined4 *)(*(int *)(this + 4) + 0x2010) = 0x44fa0000;
}
}
}
}
}
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.