mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 22:09:39 +00:00
[Client] Play sound for object placements where droppedByPlayer is true
This commit is contained in:
parent
1a7060c5c5
commit
4b69d1cc51
1 changed files with 6 additions and 2 deletions
|
@ -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
|
// Because gold automatically gets replaced with a new object, make sure we set the mpNum at the end
|
||||||
newPtr.getCellRef().setMpNum(baseObject.mpNum);
|
newPtr.getCellRef().setMpNum(baseObject.mpNum);
|
||||||
|
|
||||||
if (guid == Main::get().getLocalPlayer()->guid && baseObject.droppedByPlayer)
|
if (baseObject.droppedByPlayer)
|
||||||
world->PCDropped(newPtr);
|
{
|
||||||
|
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&)
|
catch (std::exception&)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue