mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 11:28: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;
|
bool bEdit = false;
|
||||||
|
|
||||||
// key blocking
|
// 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))
|
if(gI_StyleProperties[gBS_Style[client]] & STYLE_BLOCK_W && (vel[0] > 0 || buttons & IN_FORWARD))
|
||||||
{
|
{
|
||||||
@ -862,6 +862,15 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
|||||||
|
|
||||||
bool bOnGround = GetEntityFlags(client) & FL_ONGROUND || bOnLadder;
|
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
|
// 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)
|
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