From ad6d663e0991c785496699e9d84732e396028ab2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 23 Jul 2013 03:44:52 -0700 Subject: [PATCH] Remove some unnecessary debug messages --- apps/openmw/mwrender/animation.cpp | 24 +++--------------------- apps/openmw/mwsound/soundmanagerimp.cpp | 14 +++++--------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 11a088e63..a8328b7cb 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -534,38 +534,20 @@ bool Animation::handleTextKey(AnimState &state, const std::string &groupname, co size_t len = evt.size() - off; if(evt.compare(off, len, "start") == 0 || evt.compare(off, len, "loop start") == 0) - { state.mLoopStartKey = key; - return true; - } - - if(evt.compare(off, len, "loop stop") == 0 || evt.compare(off, len, "stop") == 0) + else if(evt.compare(off, len, "loop stop") == 0 || evt.compare(off, len, "stop") == 0) { if(doLoop(state)) { if(state.mTime >= time) return false; } - return true; } - - if(evt.compare(off, len, "equip attach") == 0) - { + else if(evt.compare(off, len, "equip attach") == 0) showWeapons(true); - return true; - } - if(evt.compare(off, len, "unequip detach") == 0) - { + else if(evt.compare(off, len, "unequip detach") == 0) showWeapons(false); - return true; - } - /* Nothing to do for these */ - if(evt.compare(off, len, "equip start") == 0 || evt.compare(off, len, "equip stop") == 0 || - evt.compare(off, len, "unequip start") == 0 || evt.compare(off, len, "unequip stop") == 0) - return true; - - std::cerr<< "Unhandled animation textkey: "<mSoundList.begin(); while(soundIter != regn->mSoundList.end()) { - const std::string go = soundIter->mSound.toString(); - int chance = (int) soundIter->mChance; - //std::cout << "Sound: " << go.name <<" Chance:" << chance << "\n"; - soundIter++; - if(r - pos < chance) + if(r - pos < soundIter->mChance) { - //play sound - std::cout << "Sound: " << go <<" Chance:" << chance << "\n"; - playSound(go, 1.0f, 1.0f); + playSound(soundIter->mSound.toString(), 1.0f, 1.0f); break; } - pos += chance; + pos += soundIter->mChance; + + soundIter++; } }