mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Reset starting angle / position when adding world item to a container
This commit is contained in:
parent
608bd0f525
commit
561c661156
@ -130,7 +130,15 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
|
||||
{
|
||||
MWWorld::ContainerStoreIterator it = addImp(itemPtr);
|
||||
MWWorld::Ptr item = *it;
|
||||
|
||||
// we may have copied an item from the world, so reset a few things first
|
||||
item.getRefData().setBaseNode(NULL);
|
||||
item.getCellRef().mPos.rot[0] = 0;
|
||||
item.getCellRef().mPos.rot[1] = 0;
|
||||
item.getCellRef().mPos.rot[2] = 0;
|
||||
item.getCellRef().mPos.pos[0] = 0;
|
||||
item.getCellRef().mPos.pos[1] = 0;
|
||||
item.getCellRef().mPos.pos[2] = 0;
|
||||
|
||||
std::string script = MWWorld::Class::get(item).getScript(item);
|
||||
if(script != "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user