mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-27 14:10:46 -04:00
readable if statement
This commit is contained in:
parent
ff40de89aa
commit
d78480120d
@ -285,7 +285,7 @@ namespace MWClass
|
|||||||
bool activeWeapUsesAmmo = activeWeapon->mWeaponClass == ESM::WeaponType::Class::Ranged;
|
bool activeWeapUsesAmmo = activeWeapon->mWeaponClass == ESM::WeaponType::Class::Ranged;
|
||||||
bool sameAmmoType = activeWeapon->mAmmoType == type;
|
bool sameAmmoType = activeWeapon->mAmmoType == type;
|
||||||
// special case for ammo equipping
|
// special case for ammo equipping
|
||||||
if (!((!activeWeapUsesAmmo && isAmmo) || (activeWeapUsesAmmo && isAmmo && sameAmmoType)))
|
if ((activeWeapUsesAmmo && !sameAmmoType) || !isAmmo)
|
||||||
return { 0, "#{sCantEquipWeapWarning}" };
|
return { 0, "#{sCantEquipWeapWarning}" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user