[Client] Disable clientside locking and unlocking of objects

0.6.3
David Cernat 7 years ago
parent 563269d359
commit f3892d697b

@ -172,8 +172,19 @@ namespace MWClass
if ((isLocked || isTrapped) && hasKey)
{
MWBase::Environment::get().getWindowManager ()->messageBox (keyName + " #{sKeyUsed}");
if(isLocked)
unlock(ptr);
/*
Start of tes3mp change (major)
Disable unilateral unlocking on this client and expect the server's reply to our
packet to do it instead
*/
//if(isLocked)
// unlock(ptr);
/*
End of tes3mp change (major)
*/
// using a key disarms the trap
if(isTrapped)
{

@ -171,8 +171,19 @@ namespace MWClass
{
if(actor == MWMechanics::getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox(keyName + " #{sKeyUsed}");
if(isLocked)
unlock(ptr); //Call the function here. because that makes sense.
/*
Start of tes3mp change (major)
Disable unilateral unlocking on this client and expect the server's reply to our
packet to do it instead
*/
//if(isLocked)
// unlock(ptr); //Call the function here. because that makes sense.
/*
End of tes3mp change (major)
*/
// using a key disarms the trap
if(isTrapped)
{

@ -68,7 +68,16 @@ namespace MWMechanics
MWBase::Environment::get().getMechanicsManager()->objectOpened(mActor, lock);
if (Misc::Rng::roll0to99() <= x)
{
lock.getClass().unlock(lock);
/*
Start of tes3mp change (major)
Disable unilateral locking on this client and expect the server's reply to our
packet to do it instead
*/
//lock.getClass().unlock(lock);
/*
End of tes3mp change (major)
*/
/*
Start of tes3mp addition

@ -692,7 +692,17 @@ namespace MWMechanics
{
if (caster == getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicLockSuccess}");
target.getClass().lock(target, static_cast<int>(magnitude));
/*
Start of tes3mp change (major)
Disable unilateral locking on this client and expect the server's reply to our
packet to do it instead
*/
//target.getClass().lock(target, static_cast<int>(magnitude));
/*
End of tes3mp change (major)
*/
/*
Start of tes3mp addition
@ -728,7 +738,17 @@ namespace MWMechanics
if (caster == getPlayer())
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicOpenSuccess}");
}
target.getClass().unlock(target);
/*
Start of tes3mp change (major)
Disable unilateral locking on this client and expect the server's reply to our
packet to do it instead
*/
//target.getClass().unlock(target);
/*
End of tes3mp change (major)
*/
/*
Start of tes3mp addition

@ -221,7 +221,16 @@ namespace MWScript
End of tes3mp addition
*/
ptr.getClass().lock (ptr, lockLevel);
/*
Start of tes3mp change (major)
Disable unilateral locking on this client and expect the server's reply to our
packet to do it instead
*/
//ptr.getClass().lock (ptr, lockLevel);
/*
End of tes3mp change (major)
*/
// Instantly reset door to closed state
// This is done when using Lock in scripts, but not when using Lock spells.
@ -261,7 +270,16 @@ namespace MWScript
End of tes3mp addition
*/
ptr.getClass().unlock (ptr);
/*
Start of tes3mp change (major)
Disable unilateral unlocking on this client and expect the server's reply to our
packet to do it instead
*/
//ptr.getClass().unlock (ptr);
/*
End of tes3mp change (major)
*/
}
};

Loading…
Cancel
Save