|
|
|
@ -56,15 +56,23 @@ namespace
|
|
|
|
|
void addObject(const MWWorld::Ptr& ptr, MWPhysics::PhysicsSystem& physics,
|
|
|
|
|
MWRender::RenderingManager& rendering)
|
|
|
|
|
{
|
|
|
|
|
std::string model = Misc::ResourceHelpers::correctActorModelPath(ptr.getClass().getModel(ptr), rendering.getResourceSystem()->getVFS());
|
|
|
|
|
bool useAnim = ptr.getClass().useAnim();
|
|
|
|
|
std::string model = ptr.getClass().getModel(ptr);
|
|
|
|
|
if (useAnim)
|
|
|
|
|
model = Misc::ResourceHelpers::correctActorModelPath(model, rendering.getResourceSystem()->getVFS());
|
|
|
|
|
|
|
|
|
|
std::string id = ptr.getCellRef().getRefId();
|
|
|
|
|
if (id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker")
|
|
|
|
|
model = ""; // marker objects that have a hardcoded function in the game logic, should be hidden from the player
|
|
|
|
|
|
|
|
|
|
ptr.getClass().insertObjectRendering(ptr, model, rendering);
|
|
|
|
|
setNodeRotation(ptr, rendering, false);
|
|
|
|
|
|
|
|
|
|
ptr.getClass().insertObject (ptr, model, physics);
|
|
|
|
|
|
|
|
|
|
if (useAnim)
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->add(ptr);
|
|
|
|
|
|
|
|
|
|
if (ptr.getClass().isActor())
|
|
|
|
|
rendering.addWaterRippleEmitter(ptr);
|
|
|
|
|
}
|
|
|
|
@ -703,10 +711,14 @@ namespace MWWorld
|
|
|
|
|
Resource::SceneManager* mSceneManager;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void Scene::preload(const std::string &mesh)
|
|
|
|
|
void Scene::preload(const std::string &mesh, bool useAnim)
|
|
|
|
|
{
|
|
|
|
|
if (!mRendering.getResourceSystem()->getSceneManager()->checkLoaded(mesh, mRendering.getReferenceTime()))
|
|
|
|
|
mRendering.getWorkQueue()->addWorkItem(new PreloadMeshItem(mesh, mRendering.getResourceSystem()->getSceneManager()));
|
|
|
|
|
std::string mesh_ = mesh;
|
|
|
|
|
if (useAnim)
|
|
|
|
|
mesh_ = Misc::ResourceHelpers::correctActorModelPath(mesh_, mRendering.getResourceSystem()->getVFS());
|
|
|
|
|
|
|
|
|
|
if (!mRendering.getResourceSystem()->getSceneManager()->checkLoaded(mesh_, mRendering.getReferenceTime()))
|
|
|
|
|
mRendering.getWorkQueue()->addWorkItem(new PreloadMeshItem(mesh_, mRendering.getResourceSystem()->getSceneManager()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Scene::preloadCells(float dt)
|
|
|
|
|