mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-26 06:40:22 +00:00
Merge pull request #2301 from Capostrophic/attack
Only set hand-to-hand attack type randomly if "always use best attack" is on (bug #4942)
This commit is contained in:
commit
d4dcc08df7
@ -50,6 +50,7 @@
|
|||||||
Bug #4916: Specular power (shininess) material parameter is ignored when shaders are used.
|
Bug #4916: Specular power (shininess) material parameter is ignored when shaders are used.
|
||||||
Bug #4922: Werewolves can not attack if the transformation happens during attack
|
Bug #4922: Werewolves can not attack if the transformation happens during attack
|
||||||
Bug #4938: Strings from subrecords with actually empty headers can't be empty
|
Bug #4938: Strings from subrecords with actually empty headers can't be empty
|
||||||
|
Bug #4942: Hand-to-Hand attack type is chosen randomly when "always use best attack" is turned off
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
Feature #3442: Default values for fallbacks from ini file
|
Feature #3442: Default values for fallbacks from ini file
|
||||||
Feature #3610: Option to invert X axis
|
Feature #3610: Option to invert X axis
|
||||||
|
@ -1630,23 +1630,25 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(mPtr == getPlayer())
|
if(mPtr == getPlayer())
|
||||||
{
|
|
||||||
if (isWeapon)
|
|
||||||
{
|
{
|
||||||
if (Settings::Manager::getBool("best attack", "Game"))
|
if (Settings::Manager::getBool("best attack", "Game"))
|
||||||
|
{
|
||||||
|
if (isWeapon)
|
||||||
{
|
{
|
||||||
MWWorld::ConstContainerStoreIterator weapon = mPtr.getClass().getInventoryStore(mPtr).getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::ConstContainerStoreIterator weapon = mPtr.getClass().getInventoryStore(mPtr).getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
mAttackType = getBestAttack(weapon->get<ESM::Weapon>()->mBase);
|
mAttackType = getBestAttack(weapon->get<ESM::Weapon>()->mBase);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
setAttackTypeBasedOnMovement();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// There is no "best attack" for Hand-to-Hand
|
// There is no "best attack" for Hand-to-Hand
|
||||||
setAttackTypeRandomly(mAttackType);
|
setAttackTypeRandomly(mAttackType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setAttackTypeBasedOnMovement();
|
||||||
|
}
|
||||||
|
}
|
||||||
// else if (mPtr != getPlayer()) use mAttackType set by AiCombat
|
// else if (mPtr != getPlayer()) use mAttackType set by AiCombat
|
||||||
startKey = mAttackType+" start";
|
startKey = mAttackType+" start";
|
||||||
stopKey = mAttackType+" min attack";
|
stopKey = mAttackType+" min attack";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user