diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index e2c74a312..24502f621 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -185,6 +185,19 @@ namespace MWClass "Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx, MWBase::SoundManager::Play_Normal); isTrapped = false; + + /* + Start of tes3mp addition + + Send an ID_OBJECT_TRAP packet every time a trap is disarmed + */ + mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent(); + worldEvent->reset(); + worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true); + worldEvent->sendObjectTrap(); + /* + End of tes3mp addition + */ } /* diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 7dddc97a8..943360cda 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -170,6 +170,19 @@ namespace MWClass "Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx, MWBase::SoundManager::Play_Normal); isTrapped = false; + + /* + Start of tes3mp addition + + Send an ID_OBJECT_TRAP packet every time a trap is disarmed + */ + mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent(); + worldEvent->reset(); + worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true); + worldEvent->sendObjectTrap(); + /* + End of tes3mp addition + */ } /* diff --git a/apps/openmw/mwmechanics/security.cpp b/apps/openmw/mwmechanics/security.cpp index 03e6997f0..d54ffa518 100644 --- a/apps/openmw/mwmechanics/security.cpp +++ b/apps/openmw/mwmechanics/security.cpp @@ -126,6 +126,19 @@ namespace MWMechanics resultSound = "Disarm Trap"; resultMessage = "#{sTrapSuccess}"; mActor.getClass().skillUsageSucceeded(mActor, ESM::Skill::Security, 0); + + /* + Start of tes3mp addition + + Send an ID_OBJECT_TRAP packet every time a trap is disarmed + */ + mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent(); + worldEvent->reset(); + worldEvent->addObjectTrap(trap, trap.getRefData().getPosition(), true); + worldEvent->sendObjectTrap(); + /* + End of tes3mp addition + */ } else resultMessage = "#{sTrapFail}";