diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-03 20:10:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-03 20:10:33 +0300 |
commit | 51975cd8624fff3b20aa3b7b1932555e32786561 (patch) | |
tree | 55ff8d9c5a459bada8038807a1eaf0dfe98945e2 /src/resources/spritedef.cpp | |
parent | fd16292e758ab6fc910ed07441e6e477d616201c (diff) | |
download | mv-51975cd8624fff3b20aa3b7b1932555e32786561.tar.gz mv-51975cd8624fff3b20aa3b7b1932555e32786561.tar.bz2 mv-51975cd8624fff3b20aa3b7b1932555e32786561.tar.xz mv-51975cd8624fff3b20aa3b7b1932555e32786561.zip |
Add spawn animation to mobs.
Also impliment sound events:
SOUND_EVENT_MOVE, SOUND_EVENT_SIT, SOUND_EVENT_SPAWN
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r-- | src/resources/spritedef.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index ceefac845..b3b473cd7 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -102,6 +102,7 @@ void SpriteDef::substituteActions() substituteAction(SpriteAction::SLEEP, SpriteAction::SIT); substituteAction(SpriteAction::HURT, SpriteAction::STAND); substituteAction(SpriteAction::DEAD, SpriteAction::HURT); + substituteAction(SpriteAction::SPAWN, SpriteAction::STAND); } void SpriteDef::loadSprite(xmlNodePtr spriteNode, int variant, @@ -287,6 +288,10 @@ void SpriteDef::loadAnimation(xmlNodePtr animationNode, { animation->addTerminator(); } + else if (xmlStrEqual(frameNode->name, BAD_CAST "jump")) + { + animation->addJump(XML::getProperty(frameNode, "action", "")); + } } // for frameNode } |