Strip color escapes in DS Map Title text.

This commit is contained in:
Mari the Deer 2023-09-27 21:01:44 +02:00
commit b409d5eb4e
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r962 \cu(Tue 26 Sep 12:58:06 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r962 \cu(2023-09-26 12:58:06)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r963 \cu(Wed 27 Sep 21:01:44 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r963 \cu(2023-09-27 21:01:44)\c-";

View file

@ -743,6 +743,9 @@ Class DSMapTitle : HUDMessageBase
txtsub = level.authorname;
if ( txt.Left(1) == "$" ) txt = StringTable.Localize(txt);
if ( txtsub.Left(1) == "$" ) txtsub = StringTable.Localize(txtsub);
// may contain color escapes, which we don't support here
SWWMUtility.StripColor(txt);
SWWMUtility.StripColor(txtsub);
// level name may contain trailing whitespace due to DEHACKED nonsense, so strip it
txt.StripRight();
int sep;