mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Fix initialization of CSpell::AnimationItem
This commit is contained in:
@@ -622,6 +622,14 @@ void CSpell::setupMechanics()
|
|||||||
mechanics = ISpellMechanics::createMechanics(this);
|
mechanics = ISpellMechanics::createMechanics(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///CSpell::AnimationInfo
|
||||||
|
CSpell::AnimationItem::AnimationItem()
|
||||||
|
:resourceName(""),verticalPosition(VerticalPosition::TOP),pause(0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///CSpell::AnimationInfo
|
///CSpell::AnimationInfo
|
||||||
CSpell::AnimationInfo::AnimationInfo()
|
CSpell::AnimationInfo::AnimationInfo()
|
||||||
{
|
{
|
||||||
@@ -958,7 +966,6 @@ CSpell * CSpellHandler::loadFromJson(const JsonNode & json)
|
|||||||
for(const JsonNode & item : queueNode)
|
for(const JsonNode & item : queueNode)
|
||||||
{
|
{
|
||||||
CSpell::TAnimation newItem;
|
CSpell::TAnimation newItem;
|
||||||
newItem.verticalPosition = VerticalPosition::TOP;
|
|
||||||
|
|
||||||
if(item.getType() == JsonNode::DATA_STRING)
|
if(item.getType() == JsonNode::DATA_STRING)
|
||||||
newItem.resourceName = item.String();
|
newItem.resourceName = item.String();
|
||||||
|
@@ -106,6 +106,8 @@ public:
|
|||||||
VerticalPosition verticalPosition;
|
VerticalPosition verticalPosition;
|
||||||
int pause;
|
int pause;
|
||||||
|
|
||||||
|
AnimationItem();
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler & h, const int version)
|
template <typename Handler> void serialize(Handler & h, const int version)
|
||||||
{
|
{
|
||||||
h & resourceName & verticalPosition;
|
h & resourceName & verticalPosition;
|
||||||
|
Reference in New Issue
Block a user