1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 03:59:56 +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)
mAttackType = "shoot";
else if (mPtr == getPlayer() || aiInactive)
else if (mPtr == getPlayer())
{
if (Settings::game().mBestAttack)
{
@ -1673,6 +1673,8 @@ namespace MWMechanics
mAttackType = getMovementBasedAttackType();
}
}
else if (aiInactive)
mAttackType = getRandomAttackType();
// else if (mPtr != getPlayer()) use mAttackType set by AiCombat
startKey = mAttackType + ' ' + startKey;
stopKey = mAttackType + " max attack";