Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DoD] client_print's displaying as "%s" in chat #776

Closed
diamond-optic opened this issue Oct 26, 2019 · 7 comments · Fixed by #778
Closed

[DoD] client_print's displaying as "%s" in chat #776

diamond-optic opened this issue Oct 26, 2019 · 7 comments · Fixed by #778

Comments

@diamond-optic
Copy link
Contributor

diamond-optic commented Oct 26, 2019

Happening even on a completely fresh stock hlds + metamod + stock amxx. 'timeleft' 'nextmap' etc all just show "%s" output in the chat.

Updated my hlds yesterday, build now showing as Jul 24 2019 (8308). Then I updated my amxx to 5386 and this started happening. Reverted back to 5378 and it works fine. Issue starts after the change in 5380.

Day of Defeat
Metamod 1.21p38
Windows Server 2008 R2

Screenshot: https://imgur.com/g1mSagN

@WPMGPRoSToTeMa
Copy link
Contributor

Do you use the latest client?

@diamond-optic
Copy link
Contributor Author

diamond-optic commented Oct 26, 2019

Updated my client yesterday as well. Verified integrity of game files today. But for the sake of trying everything, I just renamed the folder and it is currently downloading a fresh copy of the client.

edit: fresh clean install of the client made no difference :-\

@Arkshine
Copy link
Member

Arkshine commented Oct 26, 2019

It's a side-effect of #763.

ValveSoftware/halflife#2611 (comment)
Dod doesn't support that.

I created a new issue : ValveSoftware/halflife#2744

I will try to make an update today to use #763 only on official mods and which supports the format string.

@WPMGPRoSToTeMa
Copy link
Contributor

WPMGPRoSToTeMa commented Oct 26, 2019

@Arkshine I hope we can use a hack with #Spec_PlayerItem (expands to %s1) for unsupported mods. It works for print_center and print_chat in dod. But unfortunately doesn't work for print_console, I hope we can fallback to svc_print for print_console if we don't need localization support.

@Arkshine
Copy link
Member

@WPMGPRoSToTeMa

Is #Spec_PlayerItem generic to HL1 games?
I don't know if localization is useful in console. Did you already see a plugin doing that?
Either way, It can wait another PR.

@WPMGPRoSToTeMa
Copy link
Contributor

@Arkshine it is located in valve/resource/valve_*.txt, as I can see this file should be fallback for any mod, and also #Spec_PlayerItem should be expanded to %s1 for any language. The problem is that SayText and TextMsg don't always support formatting, for example SayText in DoD takes only one string and looks like TextMsg in DoD takes only one string too for print_console.

What about replacing TextMsg+print_console with svc_print and other, I'm not sure that they behave exactly the same in all mods. For example, TextMsg+print_center behaves differently than svc_centerprint in DoD (TextMsg+print_center in DoD looks like show_hudmessage).

So I think it is better to leave it as it is now.

@Arkshine
Copy link
Member

Safer to keep the original behavior if we don't know the result will be the same across all mods.

I don't have personally the time to check all HL1 mods. However, I don't mind adding a rule for a specific mod if someone provides it.

That's said, we cover the official mods which represents 98.94% of servers.
Actually, just tested Adrenaline Gamer (99.35% with it) and it works fine. I'm pretty sure that most of HL1 non-official mods supports format string by default. This feature was just removed on official mods before (actually only on CS?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants