forked from teamnwah/openmw-tes3coop
Reset starting angle / position when adding world item to a container
This commit is contained in:
parent
608bd0f525
commit
561c661156
1 changed files with 8 additions and 0 deletions
|
@ -130,7 +130,15 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
|
||||||
{
|
{
|
||||||
MWWorld::ContainerStoreIterator it = addImp(itemPtr);
|
MWWorld::ContainerStoreIterator it = addImp(itemPtr);
|
||||||
MWWorld::Ptr item = *it;
|
MWWorld::Ptr item = *it;
|
||||||
|
|
||||||
|
// we may have copied an item from the world, so reset a few things first
|
||||||
item.getRefData().setBaseNode(NULL);
|
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);
|
std::string script = MWWorld::Class::get(item).getScript(item);
|
||||||
if(script != "")
|
if(script != "")
|
||||||
|
|
Loading…
Reference in a new issue