From 332530aead399de6af45ed0bb62184b0a85f7fd7 Mon Sep 17 00:00:00 2001 From: Maxim Telezhenko Date: Wed, 18 Nov 2015 23:38:16 +0300 Subject: [PATCH] v0.5.2-beta release. --- ChangeLog.txt | 4 ++++ ToDo.txt | 4 +++- addons/sourcemod/scripting/smartjaildoors.sp | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 706a1b3..836b9a4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,2 +1,6 @@ +v0.5.2-beta +Fixed bug, when u can use button in spectate mode. +Distance of use increased from 64 to 80. + v0.5.1-beta Optimization. \ No newline at end of file diff --git a/ToDo.txt b/ToDo.txt index faae616..2c05e8f 100644 --- a/ToDo.txt +++ b/ToDo.txt @@ -1,4 +1,6 @@ Add 'only open' mode setting for map. Add OnOpenDoor forward (In progress). Add OnCloseDoor forward (In progress). -Add Lock/Unlock doors. \ No newline at end of file +Add Lock/Unlock doors. +Поддержку CS:S +? Исправить %t на %T в функциях где нет клиента \ No newline at end of file diff --git a/addons/sourcemod/scripting/smartjaildoors.sp b/addons/sourcemod/scripting/smartjaildoors.sp index f7c7e72..3785f98 100644 --- a/addons/sourcemod/scripting/smartjaildoors.sp +++ b/addons/sourcemod/scripting/smartjaildoors.sp @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see -#define PLUGIN_VERSION "0.5.1-beta" +#define PLUGIN_VERSION "0.5.2-beta" #include #include @@ -40,7 +40,7 @@ public Plugin myinfo = #define CHAT_PATTERN "[SJD] %t" // Pattern for all plugin's msgs in chat. If you want replace tag - edit this. (no support colors tags) -#define BUTTON_USE 64.0 // Distance before button for active +#define BUTTON_USE 80.0 // Distance before button for active #define BUTTON_HEIGHT 52.2 // Button settings #define USE_AREA 15.0 // Distance from button top as radius sphere where u can use button #define BUTTON_USE_SOUND "buttons/button3.wav" // Default button use sound @@ -421,7 +421,7 @@ public Action OnPlayerRunCmd(int client, int &f_buttons, int &impulse, float vel if (f_buttons & IN_USE == IN_USE && g_oldButtons[client] & IN_USE != IN_USE) { #if defined NEW_USE_LOGIC - if (HaveButtonsInCfg() && cv_sjd_buttons_filter.BoolValue ? (GetClientTeam(client) == CS_TEAM_CT) : true) { + if (IsPlayerAlive(client) && HaveButtonsInCfg() && (!cv_sjd_buttons_filter.BoolValue || GetClientTeam(client) == CS_TEAM_CT)) { char mapName[64]; GetCurrentMap(mapName, sizeof(mapName)); if (IsMapConfigured(mapName)) { @@ -471,7 +471,7 @@ public Action OnPlayerRunCmd(int client, int &f_buttons, int &impulse, float vel } } #else - if (HaveButtonsInCfg() && cv_sjd_buttons_filter.BoolValue ? (GetClientTeam(client) == CS_TEAM_CT) : true) { + if (IsPlayerAlive(client) && HaveButtonsInCfg() && (!cv_sjd_buttons_filter.BoolValue || GetClientTeam(client) == CS_TEAM_CT)) { int target = GetClientAimTarget(client, false); if (target != -1) { char mapname[64];