Lua object parser: Object name is now parsed correctly (no more ] at the end of the name)

This commit is contained in:
MascaraSnake 2016-05-31 21:51:34 +02:00
parent f4af77e7fa
commit e7569ff973

View file

@ -85,14 +85,13 @@ namespace CodeImp.DoomBuilder.SRB2
if (!string.IsNullOrEmpty(token))
{
if (!token.StartsWith("mobjinfo[") || !token.EndsWith("]")) continue;
string objname = token.Substring(9);
string objname = token.Substring(9).TrimEnd(new char[] { ']' });
string name = objname;
string sprite = DataManager.INTERNAL_PREFIX + "unknownthing";
string[] states = new string[8];
int mapThingNum = -1;
int radius = 0;
int height = 0;
objname = objname.TrimEnd(new char[] { ']' });
SkipWhitespace(true);
token = ReadToken();