1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Fix wind gravity affector

This commit is contained in:
scrawl 2013-12-11 15:15:30 +01:00
parent 57a33c957e
commit 0c3c3ed8e9
2 changed files with 2 additions and 2 deletions

View File

@ -724,7 +724,7 @@ class NIFObjectLoader
{ {
const Nif::NiMaterialColorController *matCtrl = dynamic_cast<const Nif::NiMaterialColorController*>(ctrls.getPtr()); const Nif::NiMaterialColorController *matCtrl = dynamic_cast<const Nif::NiMaterialColorController*>(ctrls.getPtr());
Ogre::ControllerValueRealPtr dstval(OGRE_NEW MaterialColorController::Value(movable, matCtrl->data.getPtr(), &scene->mMaterialControllerMgr)); Ogre::ControllerValueRealPtr dstval(OGRE_NEW MaterialColorController::Value(movable, matCtrl->data.getPtr(), &scene->mMaterialControllerMgr));
AlphaController::Function* function = OGRE_NEW AlphaController::Function(matCtrl, (animflags&Nif::NiNode::AnimFlag_AutoPlay)); MaterialColorController::Function* function = OGRE_NEW MaterialColorController::Function(matCtrl, (animflags&Nif::NiNode::AnimFlag_AutoPlay));
scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength); scene->mMaxControllerLength = std::max(function->mStopTime, scene->mMaxControllerLength);
Ogre::ControllerFunctionRealPtr func(function); Ogre::ControllerFunctionRealPtr func(function);
scene->mControllers.push_back(Ogre::Controller<Ogre::Real>(srcval, dstval, func)); scene->mControllers.push_back(Ogre::Controller<Ogre::Real>(srcval, dstval, func));

View File

@ -763,7 +763,7 @@ public:
protected: protected:
void applyWindForce(Ogre::ParticleSystem *psys, Ogre::Real timeElapsed) void applyWindForce(Ogre::ParticleSystem *psys, Ogre::Real timeElapsed)
{ {
const Ogre::Vector3 vec = mDirection * mForce * timeElapsed; const Ogre::Vector3 vec = mBone->_getDerivedOrientation() * mDirection * mForce * timeElapsed;
Ogre::ParticleIterator pi = psys->_getIterator(); Ogre::ParticleIterator pi = psys->_getIterator();
while (!pi.end()) while (!pi.end())
{ {