Merge pull request #186 from OpenMW/master

Add OpenMW commits up to 15 Mar 2017
0.6.1
David Cernat 8 years ago committed by GitHub
commit 5eb183bacf

@ -22,6 +22,7 @@ Programmers
Alexander Nadeau (wareya)
Alexander Olofsson (Ace)
Allofich
Andrei Kortunov (akortunov)
AnyOldName3
Aussiemon
Austin Salgat (Salgat)

@ -1959,12 +1959,14 @@ namespace MWGui
void WindowManager::cycleSpell(bool next)
{
mSpellWindow->cycle(next);
if (!isGuiMode())
mSpellWindow->cycle(next);
}
void WindowManager::cycleWeapon(bool next)
{
mInventoryWindow->cycle(next);
if (!isGuiMode())
mInventoryWindow->cycle(next);
}
void WindowManager::setConsoleSelectedObject(const MWWorld::Ptr &object)

@ -1057,7 +1057,7 @@ void Optimizer::MergeGeometryVisitor::checkAllowedToMerge()
{
osg::StateSet* stateSet = *it;
osg::StateSet::RenderBinMode mode = stateSet->getRenderBinMode();
if (override && (!mode & osg::StateSet::PROTECTED_RENDERBIN_DETAILS))
if (override && !(mode & osg::StateSet::PROTECTED_RENDERBIN_DETAILS))
continue;
if (mode & osg::StateSet::USE_RENDERBIN_DETAILS)
renderingHint = stateSet->getRenderingHint();

@ -37,7 +37,7 @@ namespace
return targetlevel;
}
float distance(const osg::BoundingBox& box, const osg::Vec3f& v)
float distanceToBox(const osg::BoundingBox& box, const osg::Vec3f& v)
{
if (box.contains(v))
return 0;
@ -79,7 +79,7 @@ public:
virtual bool isSufficientDetail(QuadTreeNode* node, const osg::Vec3f& eyePoint)
{
float dist = distance(node->getBoundingBox(), eyePoint);
float dist = distanceToBox(node->getBoundingBox(), eyePoint);
int nativeLodLevel = Log2(static_cast<unsigned int>(node->getSize()/mMinSize));
int lodLevel = Log2(static_cast<unsigned int>(dist/(8192*mMinSize)));

Loading…
Cancel
Save