forked from teamnwah/openmw-tes3coop
Fixed: scene: adjust rotation/scale when creating objects
This commit is contained in:
parent
e8e3c211a4
commit
5c1b3fc043
2 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue