FWGS / xash3d-fwgs

Xash3D FWGS engine
1.58k stars 241 forks source link

SayText and TextMsg #1859

Closed GLoOoccK closed 1 month ago

GLoOoccK commented 1 month ago

Problem displaying messages with plugins and modules that use #Spec_PlayerItem

Spec_PlayerItem

https://github.com/alliedmodders/amxmodx/issues/776#issuecomment-546615132 https://github.com/WPMGPRoSToTeMa/SafeNameAndChat/blob/master/Main.cpp#L990-L1029 https://github.com/OciXCrom/ChatManager/blob/master/scripting/include/cromchat.inc#L892

a1batross commented 1 month ago

Engine version?

a1batross commented 1 month ago

Are you sure it's also engine problem and not cs16-client specific?

GLoOoccK commented 1 month ago

I'm using:

Xash3D FWGS 49/0.21 (win32-i386 build 3494) https://github.com/FWGS/xash3d-fwgs/actions/runs/11507001497

I don't know if it's a specific problem with cs16-client

Buggem commented 1 month ago

cs16-client used on windows/linux is very unstable sadly. It probably is a cs16-client problem.

a1batross commented 1 month ago

#Spec_PlayerItem is defined NOT in titles.txt but in valve_english.txt.

Ideally, those strings should've been translated using pre-existing VGUI2 translation files support but instead it follows hardcoded array of strings, and #Spec_PlayerItem isn't one of them: https://github.com/Velaron/cs16-client/blob/8f325bc5e42c4e073cd46e9377118806fb7d59cf/cl_dll/saytext.cpp#L180

I probably wrote this part before I implemented VGUI2 translation files parsing and forgot to fix it.

cc @Velaron could you add Localize() call there or just turn #Spec_PlayerItem into a %s.

a1batross commented 1 month ago

Closing it here as it's definitely a cs16-client bug. Reopen issue at https://github.com/Velaron/cs16-client.