[BUG] OgreOggISound Constructor

al2950

29-06-2012 16:25:29

Hi

I have jsut come across a fairly nasty bug in OgreOggISound. It is trying to set a base class variable (mName) in its initialisation list, which is a no no in C++! This causes the the movable object name to be blank. Simple fix is

from

OgreOggISound::OgreOggISound(const Ogre::String& name, const Ogre::SceneManager& scnMgr) :
mName(name)
,mSource(0)
,mLoop(false)
......


To:

OgreOggISound::OgreOggISound(const Ogre::String& name, const Ogre::SceneManager& scnMgr) :
Ogre::MovableObject(name)
,mSource(0)
,mLoop(false)
......


***EDIT***
Sorry just realised that you have a variable called mName defined in OgreOggISound as well as the base object Ogre::MovableObject, and a getName function. Not sure why this is, but it has caused me a headache! So I have removed both the variable and function from OgreOggISound, so it will just use the base class and not confuse me :?

stickymango

27-08-2012 21:47:02

Good spot, that should be using the MovableObject member variable and there shouldn't be a second variable declared in OgrOggISound.

Thanks.