1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-04 05:45:35 +00:00

re-enabled batching for statics; fixed a misplaced assert

This commit is contained in:
Marc Zinnschlag 2012-02-06 09:42:24 +01:00
parent ee02154805
commit c471aa950f

View file

@ -15,11 +15,11 @@ namespace MWClass
assert (ref->base != NULL); assert (ref->base != NULL);
const std::string &model = ref->base->model; const std::string &model = ref->base->model;
if (!model.empty()) if (!model.empty())
{ {
MWRender::Objects& objects = renderingInterface.getObjects(); MWRender::Objects& objects = renderingInterface.getObjects();
objects.insertBegin(ptr, ptr.getRefData().isEnabled(), false); objects.insertBegin(ptr, ptr.getRefData().isEnabled(), true);
objects.insertMesh(ptr, "meshes\\" + model); objects.insertMesh(ptr, "meshes\\" + model);
} }
} }
@ -29,13 +29,12 @@ namespace MWClass
ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref = ESMS::LiveCellRef<ESM::Static, MWWorld::RefData> *ref =
ptr.get<ESM::Static>(); ptr.get<ESM::Static>();
const std::string &model = ref->base->model;
assert (ref->base != NULL); assert (ref->base != NULL);
const std::string &model = ref->base->model;
if(!model.empty()){ if(!model.empty()){
physics.insertObjectPhysics(ptr, "meshes\\" + model); physics.insertObjectPhysics(ptr, "meshes\\" + model);
} }
} }
std::string Static::getName (const MWWorld::Ptr& ptr) const std::string Static::getName (const MWWorld::Ptr& ptr) const