diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-16 23:06:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-18 21:31:52 +0300 |
commit | 67d3b8c193b51bbf892fd965547746511e8ddf87 (patch) | |
tree | b11031d009c6df44263f0be9f01503fae2c09615 /src/resources/beinginfo.cpp | |
parent | 884c064f762c4d5ca23458ea43d9c34348259840 (diff) | |
download | manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.gz manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.bz2 manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.xz manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.zip |
add delay to action sounds.
delay now unused.
Diffstat (limited to 'src/resources/beinginfo.cpp')
-rw-r--r-- | src/resources/beinginfo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index fc6139e83..99ce2ff6f 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -92,18 +92,19 @@ void BeingInfo::setTargetCursorSize(const std::string &size) } } -void BeingInfo::addSound(const SoundEvent event, const std::string &filename) +void BeingInfo::addSound(const SoundEvent event, const std::string &filename, + const int delay) { if (mSounds.find(event) == mSounds.end()) - mSounds[event] = new StringVect; + mSounds[event] = new SoundInfoVect; if (mSounds[event]) - mSounds[event]->push_back("sfx/" + filename); + mSounds[event]->push_back(SoundInfo("sfx/" + filename, delay)); } -const std::string &BeingInfo::getSound(const SoundEvent event) const +const SoundInfo &BeingInfo::getSound(const SoundEvent event) const { - static std::string emptySound(""); + static SoundInfo emptySound("", 0); const SoundEvents::const_iterator i = mSounds.find(event); return (i == mSounds.end() || !i->second) ? emptySound : |