Bugzilla – Bug 3040
LANG_SERVER and LANG_PLAYER mixed in CS statistics
Last modified: 2014-05-04 11:45:44 PDT
1.8.0-r3625 Look at this - I had Polish as client language and English as server language. Why some of those stats are coded with LANG_SERVER and some as LANG_PLAYER? It looks like those from statsx are coded with LANG_SERVER parameter. There is no reason to have some statistics in the server language, and some with player's language.
This is the picture I missed in the first post.
I am changing this to a feature request because it's not a bug per-se -- it's a short-sighted design. StatsX uses global buffers everywhere and changing it to allow for per-client languages is a big task.
Created attachment 3913 [details] [review] Proposed Patch This patch moves formatting from LANG_SERVER to player-specific translations where possible. It includes other minor improvements: - formatex used everywhere - removed define-usage in favor of charsmax where possible - removed named cvar access in favor of pcvars - no implicit usages of global buffers anymore - moved spawn detection from resethud to ham_spawn - fixed a code piece where a player id cache was not used (think id = players[i]) The only function where LANG_SERVER is still used is the report function. It goes through engclient_cmd and prints the statistics with say_team. It's not possible to move this to player-specific translations without either changing the functionality/looks or manually replicating that porion of the chat. Since this is the first time in almost a decade of using AMXX that I've even seen this function I considered this to be only a minute annoyance. I've done the work on the statsx-lang branch on my gitlab repo. You can follow the evolving changes there (https://labs.alliedmods.net/Nextra/amxmodx/commits/statsx-lang). I don't know if we want small commits in the main repo, apply this patch, use a merge request or rebase the commits into one and then merge. Your call.
Created attachment 3914 [details] [review] Proposed Patch One more try. Splinter just doesn't like me...
Created attachment 3915 [details] [review] Proposed patch Let me try.
Created attachment 3916 [details] [review] Updated proposed patch Hmmm.
Created attachment 3917 [details] [review] Final patch Patch with new minor additions Arkshine pointed out. Hopefully splinter-compatible.... - Switch replace_all to new replace_string - Additional conversions to charsmax - Set task timer to 0.1 instead of 0.01 which doesn't work anyway - Add is_user_alive check to eventSpawn