Fixed: added more sprite name sanity checks to MODELDF parser.

This commit is contained in:
MaxED 2016-09-11 19:27:05 +00:00
parent c4518c60a2
commit 1e7f0e6bc5

View file

@ -86,7 +86,8 @@ namespace CodeImp.DoomBuilder.ZDoom
ThingTypeInfo info = General.Map.Data.GetThingInfoEx(actorsbyclass[classname]);
// Actor has a valid sprite?
if(info != null && !string.IsNullOrEmpty(info.Sprite) && !info.Sprite.ToLowerInvariant().StartsWith(DataManager.INTERNAL_PREFIX))
if(info != null && !string.IsNullOrEmpty(info.Sprite) && !info.Sprite.ToLowerInvariant().StartsWith(DataManager.INTERNAL_PREFIX)
&& (info.Sprite.Length == 6 || info.Sprite.Length == 8))
{
string targetsprite = info.Sprite.Substring(0, 5);
if(mds.Frames.ContainsKey(targetsprite))