forked from mirror/openmw-tes3mp
Use the sound manager's update to make sure music is still playing
This commit is contained in:
parent
0261aac518
commit
5ae47f783e
3 changed files with 5 additions and 6 deletions
|
@ -117,11 +117,7 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
||||||
|
|
||||||
// sound
|
// sound
|
||||||
if (mUseSound)
|
if (mUseSound)
|
||||||
{
|
|
||||||
mEnvironment.mSoundManager->playPlaylist();
|
|
||||||
|
|
||||||
mEnvironment.mSoundManager->update (evt.timeSinceLastFrame);
|
mEnvironment.mSoundManager->update (evt.timeSinceLastFrame);
|
||||||
}
|
|
||||||
|
|
||||||
// update GUI
|
// update GUI
|
||||||
Ogre::RenderWindow* window = mOgre->getWindow();
|
Ogre::RenderWindow* window = mOgre->getWindow();
|
||||||
|
|
|
@ -384,6 +384,10 @@ namespace MWSound
|
||||||
{
|
{
|
||||||
timePassed = 0.0f;
|
timePassed = 0.0f;
|
||||||
|
|
||||||
|
// Make sure music is still playing
|
||||||
|
if(!mMusic || !mMusic->isPlaying())
|
||||||
|
startRandomTitle();
|
||||||
|
|
||||||
Ogre::Camera *cam = mEnvironment.mWorld->getPlayer().getRenderer()->getCamera();
|
Ogre::Camera *cam = mEnvironment.mWorld->getPlayer().getRenderer()->getCamera();
|
||||||
Ogre::Vector3 nPos, nDir, nUp;
|
Ogre::Vector3 nPos, nDir, nUp;
|
||||||
nPos = cam->getRealPosition();
|
nPos = cam->getRealPosition();
|
||||||
|
|
|
@ -83,10 +83,9 @@ namespace MWSound
|
||||||
bool isMusicPlaying();
|
bool isMusicPlaying();
|
||||||
///< Returns true if music is playing
|
///< Returns true if music is playing
|
||||||
|
|
||||||
void playPlaylist(std::string playlist="");
|
void playPlaylist(std::string playlist);
|
||||||
///< Start playing music from the selected folder
|
///< Start playing music from the selected folder
|
||||||
/// \param name of the folder that contains the playlist
|
/// \param name of the folder that contains the playlist
|
||||||
/// if none is set then it plays from the current playlist
|
|
||||||
|
|
||||||
void say(MWWorld::Ptr reference, const std::string& filename);
|
void say(MWWorld::Ptr reference, const std::string& filename);
|
||||||
///< Make an actor say some text.
|
///< Make an actor say some text.
|
||||||
|
|
Loading…
Reference in a new issue