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:
parent
57a33c957e
commit
0c3c3ed8e9
@ -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));
|
||||||
|
@ -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())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user