diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-04 12:50:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-04 12:50:06 +0300 |
commit | 9150a4f7372f46fce8ea14082d5d9ab362334a6e (patch) | |
tree | 9dfa652962a63469dcdb5ad5a50dfeee69a932ef /src/resources | |
parent | 23431afb89fdd0fd562485977f41fa258247ceec (diff) | |
download | mv-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.gz mv-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.bz2 mv-9150a4f7372f46fce8ea14082d5d9ab362334a6e.tar.xz mv-9150a4f7372f46fce8ea14082d5d9ab362334a6e.zip |
Fix default animation in actions with missing dead animation (for old servers)
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/spritedef.cpp | 6 |
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); } } |