forked from mirror/openmw-tes3mp
Don't batch statics that have "references persist" set (temporary fix for Arkngthand door - Fixes #1386)
This commit is contained in:
parent
69855097ca
commit
823ccb1b3d
5 changed files with 10 additions and 4 deletions
|
@ -14,9 +14,12 @@ namespace MWClass
|
|||
{
|
||||
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
|
||||
{
|
||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
|
||||
const std::string model = getModel(ptr);
|
||||
if (!model.empty()) {
|
||||
renderingInterface.getObjects().insertModel(ptr, model);
|
||||
renderingInterface.getObjects().insertModel(ptr, model, !ref->mBase->mPersistent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void Objects::insertBegin(const MWWorld::Ptr& ptr)
|
|||
ptr.getRefData().setBaseNode(insert);
|
||||
}
|
||||
|
||||
void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh)
|
||||
void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool batch)
|
||||
{
|
||||
insertBegin(ptr);
|
||||
|
||||
|
@ -99,7 +99,7 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh)
|
|||
mBounds[ptr.getCell()] = Ogre::AxisAlignedBox::BOX_NULL;
|
||||
mBounds[ptr.getCell()].merge(bounds);
|
||||
|
||||
if(ptr.getTypeName() == typeid(ESM::Static).name() &&
|
||||
if(batch &&
|
||||
Settings::Manager::getBool("use static geometry", "Objects") &&
|
||||
anim->canBatch())
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
, mRootNode(NULL)
|
||||
{}
|
||||
~Objects(){}
|
||||
void insertModel(const MWWorld::Ptr& ptr, const std::string &model);
|
||||
void insertModel(const MWWorld::Ptr& ptr, const std::string &model, bool batch=false);
|
||||
|
||||
ObjectAnimation* getAnimation(const MWWorld::Ptr &ptr);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace ESM
|
|||
|
||||
void Static::load(ESMReader &esm)
|
||||
{
|
||||
mPersistent = esm.getRecordFlags() & 0x0400;
|
||||
mModel = esm.getHNString("MODL");
|
||||
}
|
||||
void Static::save(ESMWriter &esm) const
|
||||
|
|
|
@ -26,6 +26,8 @@ struct Static
|
|||
|
||||
std::string mId, mModel;
|
||||
|
||||
bool mPersistent;
|
||||
|
||||
void load(ESMReader &esm);
|
||||
void save(ESMWriter &esm) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue