CTerrorGameMovement::CheckJumpButton
0x004fc040 · 492 bytes · __thiscall
_ZN19CTerrorGameMovement15CheckJumpButtonEv
Decompiled
undefined (1 param)
/* CTerrorGameMovement::CheckJumpButton() */
undefined4 __thiscall CTerrorGameMovement::CheckJumpButton(CTerrorGameMovement *this)
{
CBaseEntity CVar1;
char cVar2;
int iVar3;
CBaseEntity *this_00;
longdouble lVar4;
if ((*(int *)(this + 0x810) == 0) || (*(char *)(*(int *)(this + 0x810) + 0x1c80) == '\0')) {
lVar4 = (longdouble)CBasePlayer::GetWaterJumpTime(*(CBasePlayer **)(this + 4));
if ((float)lVar4 != 0.0) {
lVar4 = (longdouble)CBasePlayer::GetWaterJumpTime(*(CBasePlayer **)(this + 4));
CBasePlayer::SetWaterJumpTime
(*(CBasePlayer **)(this + 4),(float)lVar4 - *(float *)(gpGlobals + 0x10));
lVar4 = (longdouble)CBasePlayer::GetWaterJumpTime(*(CBasePlayer **)(this + 4));
if (0.0 <= (float)lVar4) {
return 0;
}
CBasePlayer::SetWaterJumpTime(*(CBasePlayer **)(this + 4),0.0);
return 0;
}
this_00 = *(CBaseEntity **)(this + 4);
CVar1 = this_00[0x253];
if (2 < (byte)CVar1) {
cVar2 = (**(code **)(*(int *)this + 0x58))(this);
if (cVar2 == '\0') {
return 0;
}
this_00 = *(CBaseEntity **)(this + 4);
CVar1 = this_00[0x253];
}
if (1 < (byte)CVar1) {
cVar2 = (**(code **)(*(int *)this + 0x58))(this);
if (cVar2 != '\0') {
(**(code **)(*(int *)this + 0x100))(this,0);
iVar3 = CBaseEntity::GetWaterType(*(CBaseEntity **)(this + 4));
if (iVar3 == 0x20) {
*(undefined4 *)(*(int *)(this + 8) + 0x48) = 0x42c80000;
}
else {
iVar3 = CBaseEntity::GetWaterType(*(CBaseEntity **)(this + 4));
if (iVar3 == 0x10) {
*(undefined4 *)(*(int *)(this + 8) + 0x48) = 0x42a00000;
}
}
lVar4 = (longdouble)CBasePlayer::GetSwimSoundTime(*(CBasePlayer **)(this + 4));
if (0.0 < (float)lVar4) {
return 0;
}
CBasePlayer::SetSwimSoundTime(*(CBasePlayer **)(this + 4),1000.0);
(**(code **)(*(int *)this + 0xfc))(this);
return 0;
}
this_00 = *(CBaseEntity **)(this + 4);
}
iVar3 = CBaseEntity::GetGroundEntity(this_00);
if (iVar3 != 0) {
if ((*(byte *)(*(int *)(this + 8) + 0x28) & 2) != 0) {
return 0;
}
DoJump(this,(Vector *)0x0);
CTerrorPlayer::SetResponsibleForAirMovement
(*(CTerrorPlayer **)(this + 0x810),(CBaseCombatCharacter *)0x0);
*(uint *)(*(int *)(this + 8) + 0x28) = *(uint *)(*(int *)(this + 8) + 0x28) | 2;
return 1;
}
}
*(uint *)(*(int *)(this + 8) + 0x28) = *(uint *)(*(int *)(this + 8) + 0x28) | 2;
return 0;
}
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.