1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 22:15:32 +00:00

Fix crash when a magic projectile has no sound defined (Fixes #1967)

This commit is contained in:
scrawl 2014-10-04 17:57:58 +02:00
parent cd7cc4bec9
commit 95378aa6ac

View file

@ -153,7 +153,8 @@ namespace MWWorld
Ogre::Vector3 pos(it->mNode->getPosition()); Ogre::Vector3 pos(it->mNode->getPosition());
Ogre::Vector3 newPos = pos + direction * duration * speed; Ogre::Vector3 newPos = pos + direction * duration * speed;
it->mSound->setPosition(newPos); if (it->mSound.get())
it->mSound->setPosition(newPos);
it->mNode->setPosition(newPos); it->mNode->setPosition(newPos);