mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +00:00
Merge branch 'engarde' into 'master'
Break invisibility after stopping preparing the attack (bug #5976) Closes #5976 See merge request OpenMW/openmw!2199
This commit is contained in:
commit
aee9191627
2 changed files with 6 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
|||
Bug #5863: GetEffect should return true after the player has teleported
|
||||
Bug #5913: Failed assertion during Ritual of Trees quest
|
||||
Bug #5937: Lights always need to be rotated by 90 degrees
|
||||
Bug #5976: Invisibility is broken when the attack starts instead of when it ends
|
||||
Bug #5978: NPCs and Creatures talk to and headtrack a player character with a 75% chameleon effect or more
|
||||
Bug #5989: Simple water isn't affected by texture filter settings
|
||||
Bug #6037: Launcher: Morrowind content language cannot be set to English
|
||||
|
|
|
@ -1352,7 +1352,6 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
bool resetIdle = ammunition;
|
||||
if(mUpperBodyState == UpperCharState_WeapEquiped && (mHitState == CharState_None || mHitState == CharState_Block))
|
||||
{
|
||||
world->breakInvisibility(mPtr);
|
||||
mAttackStrength = 0;
|
||||
|
||||
// Randomize attacks for non-bipedal creatures
|
||||
|
@ -1397,6 +1396,7 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
static const bool useCastingAnimations = Settings::Manager::getBool("use magic item animations", "Game");
|
||||
if (isMagicItem && !useCastingAnimations)
|
||||
{
|
||||
world->breakInvisibility(mPtr);
|
||||
// Enchanted items by default do not use casting animations
|
||||
world->castSpell(mPtr);
|
||||
resetIdle = false;
|
||||
|
@ -1404,6 +1404,7 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
}
|
||||
else if(!spellid.empty() && canCast)
|
||||
{
|
||||
world->breakInvisibility(mPtr);
|
||||
MWMechanics::CastSpell cast(mPtr, nullptr, false, mCastingManualSpell);
|
||||
cast.playSpellCastingEffects(spellid, isMagicItem);
|
||||
|
||||
|
@ -1476,6 +1477,7 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
}
|
||||
else if(mWeaponType == ESM::Weapon::PickProbe)
|
||||
{
|
||||
world->breakInvisibility(mPtr);
|
||||
MWWorld::ContainerStoreIterator weapon = cls.getInventoryStore(mPtr).getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||
MWWorld::Ptr item = *weapon;
|
||||
// TODO: this will only work for the player, and needs to be fixed if NPCs should ever use lockpicks/probes.
|
||||
|
@ -1576,6 +1578,7 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete);
|
||||
if(mUpperBodyState == UpperCharState_MinAttackToMaxAttack && !isKnockedDown())
|
||||
{
|
||||
world->breakInvisibility(mPtr);
|
||||
float attackStrength = complete;
|
||||
float minAttackTime = mAnimation->getTextKeyTime(mCurrentWeapon+": "+mAttackType+" "+"min attack");
|
||||
float maxAttackTime = mAnimation->getTextKeyTime(mCurrentWeapon+": "+mAttackType+" "+"max attack");
|
||||
|
@ -1703,6 +1706,7 @@ bool CharacterController::updateState(CharacterState idle)
|
|||
break;
|
||||
}
|
||||
|
||||
world->breakInvisibility(mPtr);
|
||||
if(weapclass != ESM::WeaponType::Ranged && weapclass != ESM::WeaponType::Thrown)
|
||||
playSwishSound(0.0f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue