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 Nadeau (wareya)
Alexander Olofsson (Ace) Alexander Olofsson (Ace)
Allofich Allofich
Andrei Kortunov (akortunov)
AnyOldName3 AnyOldName3
Aussiemon Aussiemon
Austin Salgat (Salgat) Austin Salgat (Salgat)

@ -1959,11 +1959,13 @@ namespace MWGui
void WindowManager::cycleSpell(bool next) void WindowManager::cycleSpell(bool next)
{ {
if (!isGuiMode())
mSpellWindow->cycle(next); mSpellWindow->cycle(next);
} }
void WindowManager::cycleWeapon(bool next) void WindowManager::cycleWeapon(bool next)
{ {
if (!isGuiMode())
mInventoryWindow->cycle(next); mInventoryWindow->cycle(next);
} }

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

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

Loading…
Cancel
Save