mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Fixed a bug of Ptr having a wrong orientation. But that's strange, seems CellRef isn't initialized properly
This commit is contained in:
parent
032ff7c879
commit
3c1a9061de
1 changed files with 8 additions and 4 deletions
|
@ -369,8 +369,9 @@ namespace MWScript
|
|||
pos.pos[2] = z;
|
||||
pos.rot[0] = pos.rot[1] = 0;
|
||||
pos.rot[2] = zRot;
|
||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPtr(itemID,false);
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ptr,*store,pos);
|
||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
|
||||
ref.getPtr().getCellRef().pos = pos;
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),*store,pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -412,8 +413,9 @@ namespace MWScript
|
|||
pos.pos[2] = z;
|
||||
pos.rot[0] = pos.rot[1] = 0;
|
||||
pos.rot[2] = zRot;
|
||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPtr(itemID,false);
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ptr,*store,pos);
|
||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
|
||||
ref.getPtr().getCellRef().pos = pos;
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),*store,pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -457,6 +459,7 @@ namespace MWScript
|
|||
|
||||
MWWorld::CellStore* store = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
|
||||
ref.getPtr().getCellRef().pos = ipos;
|
||||
ref.getPtr().getRefData().setCount(count);
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),*store,ipos);
|
||||
}
|
||||
|
@ -499,6 +502,7 @@ namespace MWScript
|
|||
|
||||
MWWorld::CellStore* store = me.getCell();
|
||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
|
||||
ref.getPtr().getCellRef().pos = ipos;
|
||||
ref.getPtr().getRefData().setCount(count);
|
||||
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),*store,ipos);
|
||||
|
||||
|
|
Loading…
Reference in a new issue