forked from teamnwah/openmw-tes3coop
Fix quick key activation delay code (regression #4536)
This commit is contained in:
parent
29a1899045
commit
9c8e284ead
1 changed files with 14 additions and 5 deletions
|
@ -324,15 +324,19 @@ namespace MWGui
|
|||
|
||||
bool isReturnNeeded = playerStats.isParalyzed() || playerStats.isDead();
|
||||
|
||||
if (isReturnNeeded)
|
||||
if (isReturnNeeded && key->type != Type_Item)
|
||||
{
|
||||
return;
|
||||
|
||||
else if (isDelayNeeded)
|
||||
}
|
||||
else if (isDelayNeeded && key->type != Type_Item)
|
||||
{
|
||||
mActivated = key;
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
mActivated = nullptr;
|
||||
|
||||
}
|
||||
|
||||
if (key->type == Type_Item || key->type == Type_MagicItem)
|
||||
{
|
||||
|
@ -370,6 +374,11 @@ namespace MWGui
|
|||
|
||||
// delay weapon switching if player is busy
|
||||
if (isDelayNeeded && (isWeapon || isTool))
|
||||
{
|
||||
mActivated = key;
|
||||
return;
|
||||
}
|
||||
else if (isReturnNeeded && (isWeapon || isTool))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue