mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Issue #370: Support for targets in containers
This commit is contained in:
parent
cc55056adf
commit
3f181f9a9d
@ -22,12 +22,15 @@ void MWWorld::Action::execute (const Ptr& actor)
|
||||
{
|
||||
if (mTeleport && actor.getRefData().getHandle()=="player")
|
||||
{
|
||||
// sound moves with player when teleporting
|
||||
MWBase::Environment::get().getSoundManager()->playSound(mSoundId, 1.0, 1.0,
|
||||
MWBase::SoundManager::Play_NoTrack);
|
||||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound3D (mTarget.isEmpty() ? actor : mTarget,
|
||||
bool local = mTarget.isEmpty() || !mTarget.isInCell(); // no usable target
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->playSound3D (local ? actor : mTarget,
|
||||
mSoundId, 1.0, 1.0,
|
||||
mTeleport ? MWBase::SoundManager::Play_NoTrack : MWBase::SoundManager::Play_Normal);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user