mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Merge remote branch 'scrawl/renderingdistance'
This commit is contained in:
commit
647c0e4df3
@ -88,11 +88,11 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
||||
NifOgre::NIFLoader::load(mesh);
|
||||
Ogre::Entity *ent = mRenderer.getScene()->createEntity(mesh);
|
||||
|
||||
/*
|
||||
Ogre::Vector3 extents = ent->getBoundingBox().getSize();
|
||||
extents *= insert->getScale();
|
||||
// float size = std::max(std::max(extents.x, extents.y), extents.z);
|
||||
|
||||
/*
|
||||
bool small = (size < 250); /// \todo config value
|
||||
|
||||
// do not fade out doors. that will cause holes and look stupid
|
||||
@ -105,6 +105,11 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh)
|
||||
mBounds[ptr.getCell()] = Ogre::AxisAlignedBox::BOX_NULL;
|
||||
|
||||
Ogre::AxisAlignedBox bounds = ent->getBoundingBox();
|
||||
bounds = Ogre::AxisAlignedBox(
|
||||
insert->_getDerivedPosition() + bounds.getMinimum(),
|
||||
insert->_getDerivedPosition() + bounds.getMaximum()
|
||||
);
|
||||
|
||||
bounds.scale(insert->getScale());
|
||||
mBounds[ptr.getCell()].merge(bounds);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user