mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-12 06:41:26 +00:00
Allow Actors to pick an attack type/animation when no AI applies
This commit is contained in:
parent
2bed7450b6
commit
1e05bb20bf
1 changed files with 3 additions and 1 deletions
|
@ -1645,12 +1645,14 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
std::string startKey = "start";
|
std::string startKey = "start";
|
||||||
std::string stopKey = "stop";
|
std::string stopKey = "stop";
|
||||||
|
MWBase::LuaManager::ActorControls* actorControls
|
||||||
|
= MWBase::Environment::get().getLuaManager()->getActorControls(mPtr);
|
||||||
|
|
||||||
if (mWeaponType != ESM::Weapon::PickProbe && !isRandomAttackAnimation(mCurrentWeapon))
|
if (mWeaponType != ESM::Weapon::PickProbe && !isRandomAttackAnimation(mCurrentWeapon))
|
||||||
{
|
{
|
||||||
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())
|
else if (mPtr == getPlayer() || actorControls->mDisableAI)
|
||||||
{
|
{
|
||||||
if (Settings::game().mBestAttack)
|
if (Settings::game().mBestAttack)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue