mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-13 05:56:39 +03:00
Merge branch 'mybodyisready' into 'master'
Delay any quick key use while the player isn't ready (bug #6054) Closes #6054 See merge request OpenMW/openmw!2198
This commit is contained in:
commit
461fdcd11b
2 changed files with 3 additions and 17 deletions
|
@ -363,11 +363,11 @@ namespace MWGui
|
|||
bool godmode = MWBase::Environment::get().getWorld()->getGodModeState();
|
||||
bool isReturnNeeded = (!godmode && playerStats.isParalyzed()) || playerStats.isDead();
|
||||
|
||||
if (isReturnNeeded && key->type != Type_Item)
|
||||
if (isReturnNeeded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (isDelayNeeded && key->type != Type_Item)
|
||||
else if (isDelayNeeded)
|
||||
{
|
||||
mActivated = key;
|
||||
return;
|
||||
|
@ -407,21 +407,6 @@ namespace MWGui
|
|||
|
||||
if (key->type == Type_Item)
|
||||
{
|
||||
bool isWeapon = item.getType() == ESM::Weapon::sRecordId;
|
||||
bool isTool = item.getType() == ESM::Probe::sRecordId ||
|
||||
item.getType() == ESM::Lockpick::sRecordId;
|
||||
|
||||
// delay weapon switching if player is busy
|
||||
if (isDelayNeeded && (isWeapon || isTool))
|
||||
{
|
||||
mActivated = key;
|
||||
return;
|
||||
}
|
||||
else if (isReturnNeeded && (isWeapon || isTool))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!store.isEquipped(item))
|
||||
MWBase::Environment::get().getWindowManager()->useItem(item);
|
||||
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue