Fix unserialization of metadata of Direction

This commit is contained in:
Florian Rival
2018-11-11 21:10:42 +00:00
parent a48d7017ea
commit 15773bca85

View File

@@ -75,11 +75,11 @@ void Direction::UnserializeFrom(const gd::SerializerElement& element) {
SetTimeBetweenFrames(
element.GetDoubleAttribute("timeBetweenFrames", 1, "tempsEntre"));
SetLoop(element.GetBoolAttribute("looping", false, "boucle"));
#if defined(GD_IDE_ONLY)
SetMetadata(element.HasAttribute("metadata")
#if defined(GD_IDE_ONLY)
SetMetadata(element.HasAttribute("metadata") || element.HasChild("metadata")
? element.GetStringAttribute("metadata")
: "");
#endif
#endif
const gd::SerializerElement& spritesElement =
element.GetChild("sprites", 0, "Sprites");