Fixed: scene: adjust rotation/scale when creating objects

actorid
emoose 12 years ago
parent e8e3c211a4
commit 5c1b3fc043

@ -237,8 +237,8 @@ void RenderingManager::addObject (const MWWorld::Ptr& ptr){
const MWWorld::Class& class_ =
MWWorld::Class::get (ptr);
class_.insertObjectRendering(ptr, *this);
}
void RenderingManager::removeObject (const MWWorld::Ptr& ptr)
{
if (!mObjects.deleteObject (ptr))

@ -41,6 +41,8 @@ namespace
{
rendering.addObject(ptr);
class_.insertObject(ptr, physics);
MWBase::Environment::get().getWorld()->rotateObject(ptr, 0, 0, 0, true);
MWBase::Environment::get().getWorld()->scaleObject(ptr, ptr.getCellRef().mScale);
}
catch (const std::exception& e)
{
@ -417,6 +419,8 @@ namespace MWWorld
{
mRendering.addObject(ptr);
MWWorld::Class::get(ptr).insertObject(ptr, *mPhysics);
MWBase::Environment::get().getWorld()->rotateObject(ptr, 0, 0, 0, true);
MWBase::Environment::get().getWorld()->scaleObject(ptr, ptr.getCellRef().mScale);
}
void Scene::removeObjectFromScene (const Ptr& ptr)

Loading…
Cancel
Save