Re-fixed: fixed a crash when determining sprite angles when there was more than one sprite for the same frame and angle.

This commit is contained in:
MaxED 2016-04-10 21:16:42 +00:00
parent 8bac02ed14
commit fd2aae7483

View file

@ -580,12 +580,17 @@ namespace CodeImp.DoomBuilder.Config
// Even more sanity checks
if(!string.IsNullOrEmpty(frames[targetangle - 1]))
General.ErrorLogger.Add(ErrorType.Warning, "Warning in actor \"" + title + "\":" + index + ". Sprite \"" + sourcename + "\", frame " + targetframe + ", angle " + targetangle + " is double-defined");
{
General.ErrorLogger.Add(ErrorType.Warning, "Warning in actor \"" + title + "\":" + index
+ ". Sprite \"" + sourcename + "\", frame " + targetframe + ", angle " + targetangle
+ " is double-defined in sprites \"" + frames[targetangle - 1] + "\" and \"" + s + "\"");
}
else
processedcount++;
{
// Add to collection
frames[targetangle - 1] = s;
processedcount++;
}
}
// Check second frame block?
@ -619,13 +624,18 @@ namespace CodeImp.DoomBuilder.Config
// Even more sanity checks
if(!string.IsNullOrEmpty(frames[targetangle - 1]))
General.ErrorLogger.Add(ErrorType.Warning, "Warning in actor \"" + title + "\":" + index + ". Sprite \"" + sourcename + "\", frame " + targetframe + ", angle " + targetangle + " is double-defined");
{
General.ErrorLogger.Add(ErrorType.Warning, "Warning in actor \"" + title + "\":" + index
+ ". Sprite \"" + sourcename + "\", frame " + targetframe + ", angle " + targetangle
+ " is double-defined in sprites \"" + frames[targetangle - 1] + "\" and \"" + s + "\"");
}
else
processedcount++;
{
// Add to collections
frames[targetangle - 1] = s;
mirror[targetangle - 1] = true;
processedcount++;
}
}
// Gathered all sprites?