mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 02:39:40 +00:00
Fix wind gravity affector
This commit is contained in:
parent
57a33c957e
commit
0c3c3ed8e9
2 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue