From 57e6f9563d56f96c919fb6ac56c3cd677edca739 Mon Sep 17 00:00:00 2001 From: rtldg <55846624+rtldg@users.noreply.github.com> Date: Thu, 15 Jul 2021 08:44:32 +0000 Subject: [PATCH] don't let zones positions be at the same spot --- addons/sourcemod/scripting/shavit-zones.sp | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/addons/sourcemod/scripting/shavit-zones.sp b/addons/sourcemod/scripting/shavit-zones.sp index 2458f025..e32ee7cf 100644 --- a/addons/sourcemod/scripting/shavit-zones.sp +++ b/addons/sourcemod/scripting/shavit-zones.sp @@ -2517,25 +2517,26 @@ public Action Shavit_OnUserCmdPre(int client, int &buttons, int &impulse, float ShowPanel(client, 2); } - else if(gI_MapStep[client] == 2) { - origin[2] += gCV_Height.FloatValue; - gV_Point2[client] = origin; + if (origin[0] == gV_Point1[client][0] || origin[1] == gV_Point1[client][1]) + { + ShowPanel(client, 2); + } + else + { + origin[2] += gCV_Height.FloatValue; + gV_Point2[client] = origin; - gI_MapStep[client]++; + gI_MapStep[client]++; - CreateEditMenu(client); + CreateEditMenu(client); + } } } - - gB_Button[client] = true; } - else - { - gB_Button[client] = false; - } + gB_Button[client] = (buttons & button) > 0; } if(InsideZone(client, Zone_Slide, (gCV_EnforceTracks.BoolValue)? track:-1) && GetEntPropEnt(client, Prop_Send, "m_hGroundEntity") == -1)