mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 06:15:32 +00:00
Merge remote-tracking branch 'origin/openmw-37' into openmw-37
This commit is contained in:
commit
f614187cd4
6 changed files with 13 additions and 5 deletions
|
@ -1062,9 +1062,9 @@ namespace MWPhysics
|
|||
void PhysicsSystem::updateScale(const MWWorld::Ptr &ptr)
|
||||
{
|
||||
ObjectMap::iterator found = mObjects.find(ptr);
|
||||
float scale = ptr.getCellRef().getScale();
|
||||
if (found != mObjects.end())
|
||||
{
|
||||
float scale = ptr.getCellRef().getScale();
|
||||
found->second->setScale(scale);
|
||||
mCollisionWorld->updateSingleAabb(found->second->getCollisionObject());
|
||||
return;
|
||||
|
|
|
@ -125,6 +125,11 @@ void Objects::insertBegin(const MWWorld::Ptr& ptr)
|
|||
|
||||
insert->setPosition(osg::Vec3(f[0], f[1], f[2]));
|
||||
|
||||
const float scale = ptr.getCellRef().getScale();
|
||||
osg::Vec3f scaleVec(scale, scale, scale);
|
||||
ptr.getClass().adjustScale(ptr, scaleVec, true);
|
||||
insert->setScale(scaleVec);
|
||||
|
||||
ptr.getRefData().setBaseNode(insert);
|
||||
}
|
||||
|
||||
|
|
|
@ -168,8 +168,8 @@ namespace MWSound
|
|||
SoundMap::const_iterator snditer = mActiveSounds.begin();
|
||||
while(snditer != mActiveSounds.end())
|
||||
{
|
||||
if(snditer->second.first == ptr && snditer->second.second == id)
|
||||
return snditer->first->isPlaying();
|
||||
if(snditer->second.first == ptr && snditer->second.second == id && snditer->first->isPlaying())
|
||||
return true;
|
||||
++snditer;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -73,6 +73,8 @@ namespace
|
|||
osg::Vec3f scaleVec (scale, scale, scale);
|
||||
ptr.getClass().adjustScale(ptr, scaleVec, true);
|
||||
rendering.scaleObject(ptr, scaleVec);
|
||||
|
||||
physics.updateScale(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +116,6 @@ namespace
|
|||
{
|
||||
addObject(ptr, mPhysics, mRendering);
|
||||
updateObjectRotation(ptr, mPhysics, mRendering, false);
|
||||
updateObjectScale(ptr, mPhysics, mRendering);
|
||||
ptr.getClass().adjustPosition (ptr, false);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
|
|
|
@ -680,7 +680,7 @@ void WeatherManager::update(float duration, bool paused)
|
|||
if ( !is_night ) {
|
||||
theta = M_PI * (adjustedHour - mSunriseTime) / dayDuration;
|
||||
} else {
|
||||
theta = M_PI * (adjustedHour - adjustedNightStart) / nightDuration;
|
||||
theta = M_PI * (1.f - (adjustedHour - adjustedNightStart) / nightDuration);
|
||||
}
|
||||
|
||||
osg::Vec3f final(
|
||||
|
|
|
@ -843,6 +843,8 @@ namespace NifOsg
|
|||
partsys->getOrCreateUserDataContainer()->addDescription("worldspace");
|
||||
}
|
||||
|
||||
partsys->setParticleScaleReferenceFrame(osgParticle::ParticleSystem::LOCAL_COORDINATES);
|
||||
|
||||
handleParticleInitialState(nifNode, partsys, partctrl);
|
||||
|
||||
partsys->setQuota(partctrl->numParticles);
|
||||
|
|
Loading…
Reference in a new issue