summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/spritedef.cpp6
-rw-r--r--src/resources/spritedef.h2
2 files changed, 4 insertions, 4 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()
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 5bbfe81bd..fb37863f8 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -125,7 +125,7 @@ class SpriteDef final : public Resource
/**
* Include another sprite into this one.
*/
- void includeSprite(const XmlNodePtr includeNode);
+ void includeSprite(const XmlNodePtr includeNode, const int variant);
/**
* Complete missing actions by copying existing ones.