Conversation
… init g_PlayerInfoList[0]. Get current player index through EV_IsLocal
…es (they always start from 1)
…_cpp fail warning
…ad of a global static variable, just in case
|
Wow, that's quite a large PR. Thank you for your work, and sorry for the delay. I noticed both positive and negative aspects in this PR. |
Yeah, sorry, I thought to split it but decided 400 lines diff isn't a lot. :D
Yep, going through them. |
But there are none. |
|
@Vladislav4KZ yeah, that's GitHub review thing. When you leave a bunch of comments, you need to press a button on top right, select the action (comment/approve/request changes) and only then all your comments will be visible. |
| "#Cstrike_Chat_T_Loc", | ||
| "\x03*(Terrorist) %s @ %s : \x01%s", | ||
| 3, true, true, true | ||
| "\x03*(Terrorist) %s1 @ %s2 : \x01%s3", |
There was a problem hiding this comment.
The argument order is wrong here.
It should be:
"\x03*(Terrorist) %s1 @ %s3 : \x01%s2",
The localization files already use this argument order:
"Cstrike_Chat_CT_Loc" "�(Counter-Terrorist) �%s1� @ �%s3� : %s2"
"Cstrike_Chat_T_Loc" "�(Terrorist) �%s1� @ �%s3� : %s2"
WRITE_STRING(pszFormat) - format string
WRITE_STRING("") - empty first argument
WRITE_STRING(text) - second argument
WRITE_STRING(placeName) - third argument
So:
%s1 is the player name
%s2 is the chat text
%s3 is the location name
There was a problem hiding this comment.
But do we actually need that? Because it seems it was added as a fallback back when I didn't added localization files parser.
There was a problem hiding this comment.
If not, I will just copy it from localization files, maybe that can be removed later.
There was a problem hiding this comment.
Right now this is causing a bug where the location name overlaps the team name using the chat message text color, and the chat message text is rendered in the team color.
There was a problem hiding this comment.
Ok, lemme fix it real quick then.
| "#Cstrike_Chat_CT_Loc", | ||
| "\x03*(Counter-Terrorist) %s @ %s : \x01%s", | ||
| 3, true, true, true | ||
| "\x03*(Counter-Terrorist) %s1 @ %s2 : \x01%s3", |
There was a problem hiding this comment.
Same as I mentioned above.
|
I left review comments using GitHub Mobile, and for some reason I didn’t see the “Finish review” button. |
| "\x03* %s1 changed name to %s2", | ||
| 2, true | ||
| }, | ||
| // VGUI2 indexed args: location is %s2, message is %s3 — natural order. |
There was a problem hiding this comment.
I think this comment is no longer relevant.


There are three kinds of bug fixes: off-by-one errors, possible OOB reads/writes and format string fixes.
It also finally implements VGUI2 style formatter, so we don't have to carry
StripIndiceshack anymore.