mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 13:20:35 +00:00
Add a clarifying comment
This commit is contained in:
parent
da4e04522b
commit
a5b147d44d
@ -28,8 +28,9 @@ namespace MWMechanics
|
|||||||
void Security::pickLock(const MWWorld::Ptr& lock, const MWWorld::Ptr& lockpick, std::string_view& resultMessage,
|
void Security::pickLock(const MWWorld::Ptr& lock, const MWWorld::Ptr& lockpick, std::string_view& resultMessage,
|
||||||
std::string_view& resultSound)
|
std::string_view& resultSound)
|
||||||
{
|
{
|
||||||
if (lock.getCellRef().getLockLevel() <= 0
|
// If it's unlocked or can not be unlocked back out immediately. Note that we're not strictly speaking checking
|
||||||
|| !lock.getClass().hasToolTip(lock)) // If it's unlocked or can not be unlocked back out immediately
|
// if the ref is locked, lock levels <= 0 can exist but they cannot be picked
|
||||||
|
if (lock.getCellRef().getLockLevel() <= 0 || !lock.getClass().hasToolTip(lock))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int uses = lockpick.getClass().getItemHealth(lockpick);
|
int uses = lockpick.getClass().getItemHealth(lockpick);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user