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:
parent
cbb9817913
commit
5043fb4246
4 changed files with 44 additions and 5 deletions
|
@ -188,7 +188,17 @@ namespace MWClass
|
||||||
// using a key disarms the trap
|
// using a key disarms the trap
|
||||||
if(isTrapped)
|
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);
|
MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "Disarm Trap", 1.0f, 1.0f);
|
||||||
isTrapped = false;
|
isTrapped = false;
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,17 @@ namespace MWClass
|
||||||
// using a key disarms the trap
|
// using a key disarms the trap
|
||||||
if(isTrapped)
|
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);
|
MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "Disarm Trap", 1.0f, 1.0f);
|
||||||
isTrapped = false;
|
isTrapped = false;
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,16 @@ namespace MWMechanics
|
||||||
MWBase::Environment::get().getMechanicsManager()->objectOpened(mActor, trap);
|
MWBase::Environment::get().getMechanicsManager()->objectOpened(mActor, trap);
|
||||||
if (Misc::Rng::roll0to99() <= x)
|
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";
|
resultSound = "Disarm Trap";
|
||||||
resultMessage = "#{sTrapSuccess}";
|
resultMessage = "#{sTrapSuccess}";
|
||||||
|
|
|
@ -40,8 +40,18 @@ namespace MWWorld
|
||||||
MWMechanics::CastSpell cast(mTrapSource, actor);
|
MWMechanics::CastSpell cast(mTrapSource, actor);
|
||||||
cast.mHitPosition = actorPosition;
|
cast.mHitPosition = actorPosition;
|
||||||
cast.cast(mSpellId);
|
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
|
Start of tes3mp addition
|
||||||
|
|
Loading…
Reference in a new issue