mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 21:45:35 +00:00
Delay any quick key use while the player isn't ready (bug #6054)
This commit is contained in:
parent
a9c1fe3ee9
commit
55f34f4f0d
2 changed files with 3 additions and 17 deletions
|
@ -49,6 +49,7 @@
|
||||||
Bug #5989: Simple water isn't affected by texture filter settings
|
Bug #5989: Simple water isn't affected by texture filter settings
|
||||||
Bug #6037: Launcher: Morrowind content language cannot be set to English
|
Bug #6037: Launcher: Morrowind content language cannot be set to English
|
||||||
Bug #6051: NaN water height in ESM file is not handled gracefully
|
Bug #6051: NaN water height in ESM file is not handled gracefully
|
||||||
|
Bug #6054: Hotkey items can be equipped while in ready to attack stance
|
||||||
Bug #6066: Addtopic "return" does not work from within script. No errors thrown
|
Bug #6066: Addtopic "return" does not work from within script. No errors thrown
|
||||||
Bug #6067: ESP loader fails for certain subrecord orders
|
Bug #6067: ESP loader fails for certain subrecord orders
|
||||||
Bug #6087: Bound items added directly to the inventory disappear if their corresponding spell effect ends
|
Bug #6087: Bound items added directly to the inventory disappear if their corresponding spell effect ends
|
||||||
|
|
|
@ -363,11 +363,11 @@ namespace MWGui
|
||||||
bool godmode = MWBase::Environment::get().getWorld()->getGodModeState();
|
bool godmode = MWBase::Environment::get().getWorld()->getGodModeState();
|
||||||
bool isReturnNeeded = (!godmode && playerStats.isParalyzed()) || playerStats.isDead();
|
bool isReturnNeeded = (!godmode && playerStats.isParalyzed()) || playerStats.isDead();
|
||||||
|
|
||||||
if (isReturnNeeded && key->type != Type_Item)
|
if (isReturnNeeded)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (isDelayNeeded && key->type != Type_Item)
|
else if (isDelayNeeded)
|
||||||
{
|
{
|
||||||
mActivated = key;
|
mActivated = key;
|
||||||
return;
|
return;
|
||||||
|
@ -407,21 +407,6 @@ namespace MWGui
|
||||||
|
|
||||||
if (key->type == Type_Item)
|
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))
|
if (!store.isEquipped(item))
|
||||||
MWBase::Environment::get().getWindowManager()->useItem(item);
|
MWBase::Environment::get().getWindowManager()->useItem(item);
|
||||||
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::ConstContainerStoreIterator rightHand = store.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
|
|
Loading…
Reference in a new issue