summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-04 12:50:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-04 12:50:06 +0300
commit9150a4f7372f46fce8ea14082d5d9ab362334a6e (patch)
tree9dfa652962a63469dcdb5ad5a50dfeee69a932ef /src/resources/spritedef.cpp
parent23431afb89fdd0fd562485977f41fa258247ceec (diff)
downloadmanaplus-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.gz
manaplus-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.bz2
manaplus-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.xz
manaplus-9150a4f7372f46fce8ea14082d5d9ab362334a6e.zip
Fix default animation in actions with missing dead animation (for old servers)
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r--src/resources/spritedef.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index da3b70559..5f3be9220 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -112,8 +112,10 @@ void SpriteDef::fixDeadAction()
ActionMap *d = (*it).second;
if (!d)
continue;
- ActionMap::iterator i = d->find("dead");
- if (i != d->end() && i->second)
+ ActionMap::iterator i = d->find(SpriteAction::DEAD);
+ ActionMap::iterator i2 = d->find(SpriteAction::STAND);
+ // search dead action and check what it not same with stand action
+ if (i != d->end() && i->second && i->second != i2->second)
(i->second)->setLastFrameDelay(0);
}
}