Digital Paint Discussion Board
Development => Bugs, Feature Requests, and Feedback => Official Feature Votes => Topic started by: webhead on January 05, 2008, 08:36:03 PM
-
3: Fix funnames so they don't screw with other characters output after it, such as in the scoreboard. - webhead, T3RR0R15T, Termin8oR
add plz. ;)
-
I think we just need to phase out the old scoreboard completely.
-
in favor of what?
-
Just use the regular scoreboard (when you hit tab) at the end of the round instead of displaying the old one. It just needs to be tweaked so it will stay up until the map change.
-
yah that sounds good. but i think there are also problems every once in a while with funnames messing with information text that shows up on the screen (and console). this usually involves italics and/or underlines affecting the entire line of text.
-
Yea, I've seen that happen.
-
http://dplogin.com/dplogin/featurevote/feature.php?id=10032
-
Related to:
http://dplogin.com/forums/index.php?topic=11180.0
Bug:
When you use underline and/or italics in your name and do not:
(1) terminate the underline/italics; or
(2) use a char_endformat (ctrl+o) at the end of your name
it frequently messes up the formatting on the line of text appearing after your name (e.g., chat, scoreboard, event text).
Note:
Only the lines that have // herron format fix on them were changed, and the precise change is (listed in parentheses). This does not fix the scoreboard that pops up at the end of the map, but it does fix the one that is brought up manually.
Fix:
1. In cl_decode.h:
case 'n': // name
Q_strncpyz(out_str, name_from_index(index_array[current_element++]), max_len);
temp_len = strlen(out_str);
out_str[temp_len] = CHAR_ENDFORMAT; // herron format fix (new)
out_str += temp_len+1; // herron format fix (temp_len"+1")
max_len -= temp_len+1; // herron format fix (temp_len"+1")
break;What it does: Prevents underlined/italics in names from carrying over into event print messages (e.g., joins, grabs, kills, etc.)
2. In cl_scores.c:
Part A if (len_noformat >= MAX_NAME_WIDTH) // name too long // herron format fix (">"=)
Part B else if (format_diff)
{
// add spaces to compensate for format codes
memset(cl_scores_info[i]+len, ' ', MAX_NAME_WIDTH - len_noformat);
cl_scores_info[i][len] = CHAR_ENDFORMAT; // herron format fix (new)
cl_scores_info[i][MAX_NAME_WIDTH+format_diff+1] = '\0'; // herron format fix (format_diff"+1")
}What it does: Prevents underlined/italics in names from carrying over into other columns on the scoreboard (e.g., ping, kills, deaths, etc.)
3. In cl_parse.c:
if (cl_timestamp->value)
Com_Printf("%c%c[%s] %c%s%s%s%c%c%c%s%s %s%s", // herron format fix (%s%s%s"%c")
CHAR_COLOR, isteam ? cl_scores_get_team_textcolor(idx) : COLOR_CHAT,
timestamp, cl_scores_get_team_splat(idx),
cl_scores_get_isalive(idx) ? "" : "[ELIM] ",
(isteam || isprivate) ? "(" : "", name_from_index(idx), CHAR_ENDFORMAT, // herron format fix ("CHAR_ENDFORMAT,")
CHAR_COLOR, isteam ? cl_scores_get_team_textcolor(idx) : COLOR_CHAT,
(isteam || isprivate) ? ")" : "",
level == PRINT_CHATN_ACTION ? "" : ":",
s, (s[strlen(s)-1] == '\n') ? "" : "\n");
else
Com_Printf("%c%c%c%s%s%s%c%c%c%s%s %s%s", cl_scores_get_team_splat(idx),
CHAR_COLOR, isteam ? cl_scores_get_team_textcolor(idx) : COLOR_CHAT,
cl_scores_get_isalive(idx) ? "" : "[ELIM] ", // jitodo - [OBS]
(isteam || isprivate) ? "(" : "", name_from_index(idx), CHAR_ENDFORMAT, // herron format fix ("CHAR_ENDFORMAT,")
CHAR_COLOR, isteam ? cl_scores_get_team_textcolor(idx) : COLOR_CHAT,
(isteam || isprivate) ? ")" : "",
level == PRINT_CHATN_ACTION ? "" : ":",
s, (s[strlen(s)-1] == '\n') ? "" : "\n");What it does: Prevents underlined/italics in names from carrying over into chat messages (e.g., say and say_team)
-
Shreds talks to me in my sleep.
Not only is herron clever as hell at C, but he is also Andy Lewis Norm.
-
:'(
-
it's quite cool (...kamikazee)
-
Can I add to this?
Can the length of a funname be calculated correctly so that it is drawn correctly? The invisible fun name characters cause lines to wrap too early and also sometimes causes extra spaces to appear.
-
The way the console system works is basically one big buffer with no concept of lines. It just draws X number of characters, then it's at the next line. I'll probably look into rewriting this system if/when I add a variable-width font.
-
erm, that screen there. Is that a double bug? cos you're on the blue team, and you've just gone and picked up the flag and dropped it....
-
lol pirate, read the text at the top. he picked it up while he was on the red team.
-
Also look at the the bottom left, it indicates the dropping of a flag.
-
Also look at the the bottom left, it indicates the dropping of a flag.
you've [...] dropped it....
lol pirate, read the text at the top. he picked it up while he was on the red team.
oops...... Man I'm bad today....
I don't really care about the whole fixing it. It makes it stand out more and looks cool. It isn't a major priority. Now a new physics engine is a completely different matter.....
-
lol youre crazy ;)
"stand out more"? uh as far as i know, thats not really the desired effect...
"looks cool"? well that's definitely subjective.
-
oops...... Man I'm bad today....
I don't really care about the whole fixing it. It makes it stand out more and looks cool. It isn't a major priority. Now a new physics engine is a completely different matter.....
You have a very odd sense of cool.
-
You have a very odd sense of cool.
Okay, okay. Maybe not cool. It just looks different.
Man I'm bad today....
-
I don't really care about the whole fixing it. It makes it stand out more and looks cool. It isn't a major priority. Now a new physics engine is a completely different matter.....
The code to fix it has been posted for 3 months
-
Sorry, I didn't mean to ignore your code suggestion. I don't think changing each piece of code where the name is displayed is the way to go about it. It needs to be fixed at the source (either where the server gets the name from the client or the client gets the list of names from the server). It's supposed to do this already. I just haven't gotten a chance to check into why it sometimes doesn't work.
-
Make, that the normal text (no color, so white ingame) from the server or client doesn't use the colors from a nickname with bad funname code.
Now; bad funname code makes a colored text:
[17:43:48] *WsP=HAT (Spyder SE) eliminated *TheWing(FIN) (Spyder SE).
Better; only the nickname and team color splats are colored:
[17:43:48] *WsP=HAT (Spyder SE) eliminated *TheWing(FIN) (Spyder SE).
-
Already in the feature vote list.
http://dplogin.com/dplogin/featurevote/feature.php?id=10032
-
Oh, 3 years old... But good, that we spoke about it :P
-
Heh, it's pretty much a bug, not a feature per se.
-
Heh, it's pretty much a bug, not a feature per se.
Yes, but the page is called "feature vote".
-
That should already be the case. Do you have the guy's name with color codes so I can try to repro this?
-
Sure, the good old stdlogs and listuserip still have the funname codes :) If you ever change that, please save the funname code somewhere for things like this.
I hope the forum doesn't break the code: ˆAWsPˆ0½ˆAHˆ0ATˆ9
-
That should already be the case. Do you have the guy's name with color codes so I can try to repro this?
Works with every name, when you make a Colour at the end like
ˆ9ic3yˆO
-
I have a fix for this in the next build. Turns out I'm a retard and used checked for (s) instead of (*s) in a couple places when I was doing the format cleanup.
-
With the name "ˆÖsˆ›uˆ×pˆ`lˆCaˆTjˆEdˆ`a… ", sometimes the name of the last weapon is colored. The name of the last player doesn't matter and i don't know why it has the funname code there.
I didn't tested all weapons, but PGP seems ok; Stingray and Trracer not.
It also add a line break (before the line is full), like you can see on the first screenshot.
-
Yeah, that's just an issue with how line wrapping is handled.
-
The break or the color?
-
Yes. :)
-
???
I hoped you write break, color or both.