From ad5d5f54f8f793e84a6d7ab9218f35c323f0c563 Mon Sep 17 00:00:00 2001 From: Histalek <16392835+Histalek@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:20:45 +0100 Subject: [PATCH] fix(base_placeable): Prevent error on pickup fail (#1697) We call `LANG.Msg` on the client which doesn't use the first parameter to address a player. This shifts all the parameters to the wrong places. Fixes #1695 --- CHANGELOG.md | 1 + gamemodes/terrortown/entities/entities/ttt_base_placeable.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 892a20654..6d4ad9f61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel - Fixed client error for a not fully initialized client (by @Histalek) - Fixed the targetID corpse hint not respecting `ttt_identify_body_woconfirm` (by @Histalek) - Fixed the beacon not being properly translated when placed (by @Histalek) +- Fixed an error when trying to pickup a placed equipment (e.g. beacon) (by @Histalek) ### Changed diff --git a/gamemodes/terrortown/entities/entities/ttt_base_placeable.lua b/gamemodes/terrortown/entities/entities/ttt_base_placeable.lua index b10ce35d9..2bfaea4a8 100644 --- a/gamemodes/terrortown/entities/entities/ttt_base_placeable.lua +++ b/gamemodes/terrortown/entities/entities/ttt_base_placeable.lua @@ -69,7 +69,7 @@ if CLIENT then end if not self:PlayerCanPickupWeapon(client) then - LANG.Msg(client, "pickup_fail", nil, MSG_MSTACK_WARN) + LANG.Msg("pickup_fail", nil, MSG_MSTACK_WARN) self:EmitSound(soundDeny)