diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index 38d31a7ce..d23b8aa6c 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -188,7 +188,17 @@ namespace MWClass // using a key disarms the trap if(isTrapped) { - ptr.getCellRef().setTrap(""); + /* + Start of tes3mp change (major) + + Disable unilateral trap disarming on this client and expect the server's reply to our + packet to do it instead + */ + //ptr.getCellRef().setTrap(""); + /* + End of tes3mp change (major) + */ + MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "Disarm Trap", 1.0f, 1.0f); isTrapped = false; diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 306af2f45..ecfdaf7d8 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -187,7 +187,17 @@ namespace MWClass // using a key disarms the trap if(isTrapped) { - ptr.getCellRef().setTrap(""); + /* + Start of tes3mp change (major) + + Disable unilateral trap disarming on this client and expect the server's reply to our + packet to do it instead + */ + //ptr.getCellRef().setTrap(""); + /* + End of tes3mp change (major) + */ + MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "Disarm Trap", 1.0f, 1.0f); isTrapped = false; diff --git a/apps/openmw/mwmechanics/security.cpp b/apps/openmw/mwmechanics/security.cpp index 4d930b576..d37a07e33 100644 --- a/apps/openmw/mwmechanics/security.cpp +++ b/apps/openmw/mwmechanics/security.cpp @@ -132,7 +132,16 @@ namespace MWMechanics MWBase::Environment::get().getMechanicsManager()->objectOpened(mActor, trap); if (Misc::Rng::roll0to99() <= x) { - trap.getCellRef().setTrap(""); + /* + Start of tes3mp change (major) + + Disable unilateral trap disarming on this client and expect the server's reply to our + packet to do it instead + */ + //trap.getCellRef().setTrap(""); + /* + End of tes3mp change (major) + */ resultSound = "Disarm Trap"; resultMessage = "#{sTrapSuccess}"; diff --git a/apps/openmw/mwworld/actiontrap.cpp b/apps/openmw/mwworld/actiontrap.cpp index 3facae94a..cf5a725bf 100644 --- a/apps/openmw/mwworld/actiontrap.cpp +++ b/apps/openmw/mwworld/actiontrap.cpp @@ -40,8 +40,18 @@ namespace MWWorld MWMechanics::CastSpell cast(mTrapSource, actor); cast.mHitPosition = actorPosition; cast.cast(mSpellId); - } - mTrapSource.getCellRef().setTrap(""); + } + + /* + Start of tes3mp change (major) + + Disable unilateral trap disarming on this client and expect the server's reply to our + packet to do it instead + */ + //mTrapSource.getCellRef().setTrap(""); + /* + End of tes3mp change (major) + */ /* Start of tes3mp addition