1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-29 04:15:33 +00:00

Use random attack type

This commit is contained in:
Zackhasacat 2024-05-15 14:09:33 -05:00
parent 0ad64cffdb
commit 20d26a9cda

View file

@ -1654,7 +1654,7 @@ namespace MWMechanics
{ {
if (weapclass == ESM::WeaponType::Ranged || weapclass == ESM::WeaponType::Thrown) if (weapclass == ESM::WeaponType::Ranged || weapclass == ESM::WeaponType::Thrown)
mAttackType = "shoot"; mAttackType = "shoot";
else if (mPtr == getPlayer() || aiInactive) else if (mPtr == getPlayer())
{ {
if (Settings::game().mBestAttack) if (Settings::game().mBestAttack)
{ {
@ -1673,6 +1673,8 @@ namespace MWMechanics
mAttackType = getMovementBasedAttackType(); mAttackType = getMovementBasedAttackType();
} }
} }
else if (aiInactive)
mAttackType = getRandomAttackType();
// else if (mPtr != getPlayer()) use mAttackType set by AiCombat // else if (mPtr != getPlayer()) use mAttackType set by AiCombat
startKey = mAttackType + ' ' + startKey; startKey = mAttackType + ' ' + startKey;
stopKey = mAttackType + " max attack"; stopKey = mAttackType + " max attack";