|
|
|
@ -53,15 +53,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);
|
|
|
|
|
}
|
|
|
|
|