Fixed: FAIL medal sprite in zandronum.pk3 was not parsed correctly

This commit is contained in:
ZZYZX 2017-03-08 23:34:21 +02:00
parent 4611aa1bc8
commit 87a2a14d7c
3 changed files with 18 additions and 4 deletions

View file

@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2933")]
[assembly: AssemblyVersion("2.3.0.2934")]
[assembly: NeutralResourcesLanguageAttribute("en")]
[assembly: AssemblyHash("717e48e")]
[assembly: AssemblyHash("4611aa1")]

View file

@ -30,9 +30,23 @@ namespace CodeImp.DoomBuilder.ZDoom
if ((token == "loop") || (token == "stop") || (token == "wait") || (token == "fail"))
{
// Ignore flow control
// [ZZ] sometimes "fail" is a sprite name... (Skulltag, Zandronum)
// probably the same can happen to other single-word flow control keywords.
// check if next token is newline.
long cpos = parser.DataStream.Position;
parser.SkipWhitespace(false);
string newline = parser.ReadToken();
parser.DataStream.Position = cpos;
if (newline == "\n") // this is actually a loop/stop/wait/fail directive and not a sprite name or something
{
lasttoken = token;
continue;
}
}
// Goto?
else if (token == "goto")
if (token == "goto")
{
gotostate = new DecorateStateGoto(actor, parser);
if (parser.HasError) return;

View file

@ -29,5 +29,5 @@ using System.Resources;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2933")]
[assembly: AssemblyVersion("2.3.0.2934")]
[assembly: NeutralResourcesLanguageAttribute("en")]