From 77181e1e170bc78ee9ffd6b893d15196c00fb2a0 Mon Sep 17 00:00:00 2001 From: XTN Date: Wed, 1 Jun 2016 17:06:34 +0200 Subject: [PATCH] Allow keys on ground & block prejump on start zone --- scripting/shavit-core.sp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripting/shavit-core.sp b/scripting/shavit-core.sp index 08c0f66d..fcf51a67 100644 --- a/scripting/shavit-core.sp +++ b/scripting/shavit-core.sp @@ -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)