1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

PlaceItem, PlaceItemCell: Make sure references are placed above terrain (Bug #2078)

This commit is contained in:
scrawl 2014-12-11 22:25:53 +01:00
parent 886903d70e
commit 7892ed35f3

View file

@ -433,7 +433,8 @@ namespace MWScript
pos.rot[2] = zRot;
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
ref.getPtr().getCellRef().setPosition(pos);
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,pos);
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,pos);
placed.getClass().adjustPosition(placed, true);
}
else
{
@ -480,7 +481,8 @@ namespace MWScript
pos.rot[2] = zRot;
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(),itemID);
ref.getPtr().getCellRef().setPosition(pos);
MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,pos);
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,pos);
placed.getClass().adjustPosition(placed, true);
}
};