mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
DECORATE support: added a warning when a sprite assigned using "$sprite" special comment does not exist.
This commit is contained in:
parent
c11d5302c1
commit
0e718c9780
1 changed files with 57 additions and 55 deletions
|
@ -589,10 +589,13 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
// Sprite forced?
|
||||
if(HasPropertyWithValue("$sprite"))
|
||||
{
|
||||
return GetPropertyValueString("$sprite", 0);
|
||||
string sprite = GetPropertyValueString("$sprite", 0); //mxd
|
||||
if(General.Map.Data.GetSpriteExists(sprite)) return sprite; //mxd. Added availability check
|
||||
|
||||
//mxd. Bitch and moan
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "DECORATE warning in " + classname + ":" + doomednum + ". The sprite \"" + sprite + "\" assigned by the \"$sprite\" property does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Try the idle state
|
||||
if(HasState("idle"))
|
||||
{
|
||||
|
@ -654,7 +657,6 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
return result + postfix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No sprite found
|
||||
return string.Empty;
|
||||
|
|
Loading…
Reference in a new issue