diff --git a/Source/Core/Dehacked/DehackedParser.cs b/Source/Core/Dehacked/DehackedParser.cs index 5dcc071a..2ee49781 100644 --- a/Source/Core/Dehacked/DehackedParser.cs +++ b/Source/Core/Dehacked/DehackedParser.cs @@ -195,10 +195,11 @@ namespace CodeImp.DoomBuilder.Dehacked linenumber++; string line = datareader.ReadLine(); + // Cut everything from the line after a #, unless it's a editor key (#$) if (line != null) - return line.Trim(); - else - return null; + return Regex.Replace(line, @"(#[^$].+)", "", RegexOptions.IgnoreCase).Trim(); + + return null; } ///