From 2ff4e3dfd8554a8cbebc7d99055dae43dc3206bb Mon Sep 17 00:00:00 2001 From: Tim Goll Date: Sun, 16 Feb 2020 23:01:34 +0100 Subject: [PATCH] small finishing touches --- .../entities/entities/ttt_traitor_button/shared.lua | 3 ++- gamemodes/terrortown/gamemode/client/cl_changes.lua | 8 ++++---- gamemodes/terrortown/gamemode/client/cl_help.lua | 11 +++++------ .../tttminiscoreboard/pure_skin_miniscoreboard.lua | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gamemodes/terrortown/entities/entities/ttt_traitor_button/shared.lua b/gamemodes/terrortown/entities/entities/ttt_traitor_button/shared.lua index d509bf30c..cacfbc0d1 100644 --- a/gamemodes/terrortown/entities/entities/ttt_traitor_button/shared.lua +++ b/gamemodes/terrortown/entities/entities/ttt_traitor_button/shared.lua @@ -1,8 +1,9 @@ --- Special button usable from range if your role has access to it -local cv_tbutton = CreateConVar("ttt2_tbutton_admin_show", "0", {FCVAR_ARCHIVE, FCVAR_NOTIFY}, "Always show the buttons to admins in range", 0, 1) if SERVER then + local cv_tbutton = CreateConVar("ttt2_tbutton_admin_show", "0", {FCVAR_ARCHIVE, FCVAR_NOTIFY}, "Always show the buttons to admins in range", 0, 1) + hook.Add("TTT2SyncGlobals", "AddTButtonGlobals", function() SetGlobalBool(cv_tbutton:GetName(), cv_tbutton:GetBool()) end) diff --git a/gamemodes/terrortown/gamemode/client/cl_changes.lua b/gamemodes/terrortown/gamemode/client/cl_changes.lua index 4739baa24..d3d8a35ac 100644 --- a/gamemodes/terrortown/gamemode/client/cl_changes.lua +++ b/gamemodes/terrortown/gamemode/client/cl_changes.lua @@ -611,10 +611,10 @@ function CreateChanges()
  • Fixed a bug with baserole initialization
  • Small other bugfixes
  • added legacy supported for limited items
  • -
  • fixed C4 defuse for non-traitor roles
  • -
  • fixed radio, works now for all roles
  • -
  • restricted huds are hidden in HUD Switcher
  • -
  • fixed ragdoll skins (hairstyles, outfits, ...)
  • +
  • Fixed C4 defuse for non-traitor roles
  • +
  • Fixed radio, works now for all roles
  • +
  • Restricted huds are hidden in HUD Switcher
  • +
  • Fixed ragdoll skins (hairstyles, outfits, ...)
  • Prevent give_equipment timer to block the shop in the next round
  • Fix sprint consuming stamina when there is no move input
  • Fix confirmation of players with no team
  • diff --git a/gamemodes/terrortown/gamemode/client/cl_help.lua b/gamemodes/terrortown/gamemode/client/cl_help.lua index 221e2f06f..9a306705a 100644 --- a/gamemodes/terrortown/gamemode/client/cl_help.lua +++ b/gamemodes/terrortown/gamemode/client/cl_help.lua @@ -92,15 +92,14 @@ local function AddBindingCategory(category, parent) -- onchange function function dPBinder:OnChange(num) - if num == 0 then - bind.Remove(curBinding, binding.name) - else - bind.Remove(curBinding, binding.name) - bind.Add(num, binding.name, true) + bind.Remove(curBinding, binding.name, true) - LocalPlayer():ChatPrint(GetPTranslation("ttt2_bindings_new", {name = binding.name, key = input.GetKeyName(num)})) + if num ~= 0 then + bind.Add(num, binding.name, true) end + LocalPlayer():ChatPrint(GetPTranslation("ttt2_bindings_new", {name = binding.name, key = input.GetKeyName(num) or "NONE"})) + curBinding = num end end diff --git a/gamemodes/terrortown/gamemode/shared/hud_elements/tttminiscoreboard/pure_skin_miniscoreboard.lua b/gamemodes/terrortown/gamemode/shared/hud_elements/tttminiscoreboard/pure_skin_miniscoreboard.lua index 328d495f5..27d372fce 100644 --- a/gamemodes/terrortown/gamemode/shared/hud_elements/tttminiscoreboard/pure_skin_miniscoreboard.lua +++ b/gamemodes/terrortown/gamemode/shared/hud_elements/tttminiscoreboard/pure_skin_miniscoreboard.lua @@ -47,6 +47,7 @@ if CLIENT then -- resort miniscoreboard if body_found is changed TTT2NET:OnUpdate("players", function(oldval, newval, reversePath) + -- check if path of changed value is one of our releavant paths if not refreshPaths[reversePath[2]] then return end -- sort playerlist: confirmed players should be in the first position