summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-16 19:50:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-16 19:50:16 +0300
commit6245cac53b34035cdd10fb01afe11c053db9396f (patch)
treec194eb56334dcb7fed9d6c11031c06a227783ef9 /src/resources/spritedef.cpp
parentcef3523b7692bd08fa90e98cd6f87184a15960c9 (diff)
downloadmv-6245cac53b34035cdd10fb01afe11c053db9396f.tar.gz
mv-6245cac53b34035cdd10fb01afe11c053db9396f.tar.bz2
mv-6245cac53b34035cdd10fb01afe11c053db9396f.tar.xz
mv-6245cac53b34035cdd10fb01afe11c053db9396f.zip
Possible fix for variant attribute usage inside sprites with include tag.
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r--src/resources/spritedef.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index f5b098d17..528151537 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -194,7 +194,7 @@ void SpriteDef::loadSprite(const XmlNodePtr spriteNode, const int variant,
else if (xmlNameEqual(node, "action"))
loadAction(node, variant_offset);
else if (xmlNameEqual(node, "include"))
- includeSprite(node);
+ includeSprite(node, variant);
}
}
@@ -407,7 +407,7 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode,
} // for frameNode
}
-void SpriteDef::includeSprite(const XmlNodePtr includeNode)
+void SpriteDef::includeSprite(const XmlNodePtr includeNode, const int variant)
{
std::string filename = XML::getProperty(includeNode, "file", "");
@@ -432,7 +432,7 @@ void SpriteDef::includeSprite(const XmlNodePtr includeNode)
return;
}
- loadSprite(rootNode, 0);
+ loadSprite(rootNode, variant);
}
SpriteDef::~SpriteDef()