1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 20:39:42 +00:00

[Client] Play sound for object placements where droppedByPlayer is true

This commit is contained in:
David Cernat 2020-02-29 18:12:46 +02:00
parent 1a7060c5c5
commit 4b69d1cc51

View file

@ -414,9 +414,13 @@ void ObjectList::placeObjects(MWWorld::CellStore* cellStore)
// Because gold automatically gets replaced with a new object, make sure we set the mpNum at the end
newPtr.getCellRef().setMpNum(baseObject.mpNum);
if (guid == Main::get().getLocalPlayer()->guid && baseObject.droppedByPlayer)
world->PCDropped(newPtr);
if (baseObject.droppedByPlayer)
{
MWBase::Environment::get().getSoundManager()->playSound3D(newPtr, newPtr.getClass().getDownSoundId(newPtr), 1.f, 1.f);
if (guid == Main::get().getLocalPlayer()->guid)
world->PCDropped(newPtr);
}
}
catch (std::exception&)
{