mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Allow keys on ground & block prejump on start zone
This commit is contained in:
parent
0164509ea5
commit
77181e1e17
@ -815,7 +815,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
bool bEdit = false;
|
||||
|
||||
// key blocking
|
||||
if(!Shavit_InsideZone(client, Zone_Freestyle) && !bOnLadder)
|
||||
if(!Shavit_InsideZone(client, Zone_Freestyle) && !bOnLadder && !bOnGround)
|
||||
{
|
||||
if(gI_StyleProperties[gBS_Style[client]] & STYLE_BLOCK_W && (vel[0] > 0 || buttons & IN_FORWARD))
|
||||
{
|
||||
@ -861,6 +861,15 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
}
|
||||
|
||||
bool bOnGround = GetEntityFlags(client) & FL_ONGROUND || bOnLadder;
|
||||
|
||||
if(Shavit_InsideZone(client, Zone_Start))
|
||||
{
|
||||
if(vel[2] > 0 || buttons & IN_JUMP)
|
||||
{
|
||||
vel[2] = 0.0;
|
||||
buttons &= ~IN_JUMP; //block jump
|
||||
}
|
||||
}
|
||||
|
||||
// autobhop
|
||||
if(gI_StyleProperties[gBS_Style[client]] & STYLE_AUTOBHOP && gCV_Autobhop.BoolValue && gB_Auto[client] && buttons & IN_JUMP && !bOnGround && GetEntProp(client, Prop_Send, "m_nWaterLevel") <= 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user