From 4e9ffc5a70ebc1c33be7f7bbd532dcc3f33ad07c Mon Sep 17 00:00:00 2001 From: NickCloud Date: Sat, 21 Sep 2024 12:46:31 +0200 Subject: [PATCH] Shopeditor: Item Buyability Broken due to Cache State (#1621) This pullrequest fixes the issue where items (not weapons) had the wrong state if a custom show was created. This means that they were always marked as selected, even if they weren't. This was due to the caching being done too early, before the items were initialized at all. The issue didn't exist for weapons because their setup is done in the engine before any lua init code is executed. --------- Co-authored-by: Tim Goll --- CHANGELOG.md | 1 + gamemodes/terrortown/gamemode/client/cl_changes.lua | 1 + gamemodes/terrortown/gamemode/client/cl_main.lua | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e15f40d2..f49404253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,6 +120,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel - Fixed avatar icons not refreshing if they were changed on Steam (by @mexikoedi) - Fixed a wrong label for the sprint speed multiplier in the F1 menu (by @TimGoll) - Fixed own player name being shown in targetID when in vehicle (by @TimGoll) +- Fixed `ShopEditor.BuildValidEquipmentCache()` being called too early on the client, resulting in a wrong cache state (by @NickCloudAT and @12problems) ### Removed diff --git a/gamemodes/terrortown/gamemode/client/cl_changes.lua b/gamemodes/terrortown/gamemode/client/cl_changes.lua index 1cd9a7c39..60f691bcd 100644 --- a/gamemodes/terrortown/gamemode/client/cl_changes.lua +++ b/gamemodes/terrortown/gamemode/client/cl_changes.lua @@ -2190,6 +2190,7 @@ function CreateChanges()
  • Avatar icons not refreshing if they were changed on Steam
  • A wrong label for the sprint speed multiplier in the F1 menu
  • Own player name being shown in targetID when in vehicle
  • +
  • Fixed ShopEditor.BuildValidEquipmentCache() being called too early on the client, resulting in a wrong cache state
  • Removed