mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
[Client] Play sound for object placements where droppedByPlayer is true
This commit is contained in:
parent
1a7060c5c5
commit
4b69d1cc51
@ -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…
x
Reference in New Issue
Block a user