diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2006-12-01 16:54:19 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2006-12-01 16:54:19 +0000 |
commit | ab431cdfab6e1842ff357c7f380cc74142601912 (patch) | |
tree | c10b04d93a14cfd1cfee98db562c5b6b00d9a2b9 /src/resources | |
parent | 30aa32025d3406920330390b97001ade27e4343a (diff) | |
download | mana-client-ab431cdfab6e1842ff357c7f380cc74142601912.tar.gz mana-client-ab431cdfab6e1842ff357c7f380cc74142601912.tar.bz2 mana-client-ab431cdfab6e1842ff357c7f380cc74142601912.tar.xz mana-client-ab431cdfab6e1842ff357c7f380cc74142601912.zip |
Monster sound effect patch
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/monsterinfo.cpp | 8 | ||||
-rw-r--r-- | src/resources/monsterinfo.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp index 1808d1c8..43aac32a 100644 --- a/src/resources/monsterinfo.cpp +++ b/src/resources/monsterinfo.cpp @@ -48,14 +48,16 @@ MonsterInfo::addSound (SoundEvent event, std::string filename) mSounds[event] = new std::vector<std::string>;
}
- mSounds[event]->push_back(filename);
+ mSounds[event]->push_back("sfx/" + filename);
}
std::string
-MonsterInfo::getSound (SoundEvent event)
+MonsterInfo::getSound (SoundEvent event) const
{
- std::map<SoundEvent, std::vector<std::string>* >::iterator i = mSounds.find(event);
+ std::map<SoundEvent, std::vector<std::string>* >::const_iterator i;
+
+ i = mSounds.find(event);
if (i == mSounds.end())
{
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index c5ded375..413dafa0 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -61,7 +61,7 @@ class MonsterInfo getSprite () const { return mSprite; };
std::string
- getSound (SoundEvent event);
+ getSound (SoundEvent event) const;
private:
|