summaryrefslogtreecommitdiff
path: root/src/resources/monsterdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-16 23:06:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-18 21:31:52 +0300
commit67d3b8c193b51bbf892fd965547746511e8ddf87 (patch)
treeb11031d009c6df44263f0be9f01503fae2c09615 /src/resources/monsterdb.cpp
parent884c064f762c4d5ca23458ea43d9c34348259840 (diff)
downloadplus-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.gz
plus-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.bz2
plus-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.xz
plus-67d3b8c193b51bbf892fd965547746511e8ddf87.zip
add delay to action sounds.
delay now unused.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r--src/resources/monsterdb.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 2fe6596b0..269cd59cd 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -147,41 +147,43 @@ void MonsterDB::load()
const std::string event = XML::getProperty(
spriteNode, "event", "");
+ const int delay = XML::getProperty(
+ spriteNode, "delay", 0);
const char *filename;
filename = reinterpret_cast<const char*>(
spriteNode->xmlChildrenNode->content);
if (event == "hit")
{
- currentInfo->addSound(SOUND_EVENT_HIT, filename);
+ currentInfo->addSound(SOUND_EVENT_HIT, filename, delay);
}
else if (event == "miss")
{
- currentInfo->addSound(SOUND_EVENT_MISS, filename);
+ currentInfo->addSound(SOUND_EVENT_MISS, filename, delay);
}
else if (event == "hurt")
{
- currentInfo->addSound(SOUND_EVENT_HURT, filename);
+ currentInfo->addSound(SOUND_EVENT_HURT, filename, delay);
}
else if (event == "die")
{
- currentInfo->addSound(SOUND_EVENT_DIE, filename);
+ currentInfo->addSound(SOUND_EVENT_DIE, filename, delay);
}
else if (event == "move")
{
- currentInfo->addSound(SOUND_EVENT_MOVE, filename);
+ currentInfo->addSound(SOUND_EVENT_MOVE, filename, delay);
}
else if (event == "sit")
{
- currentInfo->addSound(SOUND_EVENT_SIT, filename);
+ currentInfo->addSound(SOUND_EVENT_SIT, filename, delay);
}
else if (event == "sittop")
{
- currentInfo->addSound(SOUND_EVENT_SITTOP, filename);
+ currentInfo->addSound(SOUND_EVENT_SITTOP, filename, delay);
}
else if (event == "spawn")
{
- currentInfo->addSound(SOUND_EVENT_SPAWN, filename);
+ currentInfo->addSound(SOUND_EVENT_SPAWN, filename, delay);
}
else
{