#71 Merged at 1111e27
  1. Leonard74123
  • Removed unnecessary formatting code from Zandronum (fixes 1165).

    Important things to note: -It's still possible to say colorized stuff in the chat but only from the console -Bot chat lines used to always be formatted Considering our chat code is already very different from ZDoom, we should still enforce the formatting on chat lines.

  • Enforce formatting in chat messages.

  • Removed the unused function PLAYER_GetName.

    On top of being unused, it also relied on the old formatting code.

  • Removed unformatted terminating color codes where userinfo_t::GetName was used.

    Those were also unnecessary as userinfo_t::GetName always return the name with an already formatted terminating color code.

  • Removed more unformatted terminating color codes.

    Those were also not needed to begin with.

  • Properly format strings that are going to be printed to the console.


  • After the formatting code was removed from the console, every lines that relied on the incorrect behavior (which were all from Zandronum) were checked with manual search of \\c in the code.

    Some of those are actually properly used (when strings are drawn directly, Zandronum used V_ColorizeString directly here) and were discarded from the search/clean-up.

    The rest was either properly formatted or removed if unnecessary (this was done/split across separate commits).

  • On some changes in the first commit:

    The original version of V_ColorizeString (char pointer) expected already formatted strings while the FString version added extra formatting on top (which conflict with the console behavior as unformatted backslashes should be accepted).

    This was removed and every calls to this function with FStrings as arguments were checked (every calls were found to be already formatted except for 2 in multiplayermenu.cpp)

    As for V_RemoveInvalidColorCodes, this was only ever used in the chat code and since unformatted backslashes should be accepted and to follow V_RemoveColorCodes, the function was made to expect formatted strings.

  • After testing, the console is found to behave exactly like in GZDoom, the problem mentioned in 1165 is fixed and the other problem that came up while fixing 1564 was also fixed.

Comments (0)