1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-28 13:09:40 +00:00

[Client] Disable clientside disarming of traps

This commit is contained in:
David Cernat 2018-07-08 02:38:10 +03:00
parent cbb9817913
commit 5043fb4246
4 changed files with 44 additions and 5 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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}";

View file

@ -41,7 +41,17 @@ namespace MWWorld
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