mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 18:39:43 +00:00
#6303 Made player stop attacking and sheathe weapon when going to jail
This commit is contained in:
parent
98d1588477
commit
a5cdc889a2
2 changed files with 8 additions and 2 deletions
|
@ -72,6 +72,7 @@
|
|||
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
||||
Bug #6291: Can't pickup the dead mage's journal from the mysterious hunter mod
|
||||
Bug #6302: Teleporting disabled actor breaks its disabled state
|
||||
Bug #6303: After "go to jail" weapon can stuck in the ready to attack state
|
||||
Bug #6307: Pathfinding in Infidelities quest from Tribunal addon is broken
|
||||
Bug #6321: Arrow enchantments should always be applied to the target
|
||||
Bug #6322: Total sold/cost should reset to 0 when there are no items offered
|
||||
|
|
|
@ -3621,14 +3621,13 @@ namespace MWWorld
|
|||
|
||||
void World::goToJail()
|
||||
{
|
||||
const MWWorld::Ptr player = getPlayerPtr();
|
||||
if (!mGoToJail)
|
||||
{
|
||||
// Reset bounty and forget the crime now, but don't change cell yet (the player should be able to read the dialog text first)
|
||||
mGoToJail = true;
|
||||
mPlayerInJail = true;
|
||||
|
||||
MWWorld::Ptr player = getPlayerPtr();
|
||||
|
||||
int bounty = player.getClass().getNpcStats(player).getBounty();
|
||||
player.getClass().getNpcStats(player).setBounty(0);
|
||||
mPlayer->recordCrimeId();
|
||||
|
@ -3641,6 +3640,12 @@ namespace MWWorld
|
|||
}
|
||||
else
|
||||
{
|
||||
if (MWBase::Environment::get().getMechanicsManager()->isAttackPreparing(player))
|
||||
{
|
||||
mPlayer->setAttackingOrSpell(false);
|
||||
}
|
||||
|
||||
mPlayer->setDrawState(MWMechanics::DrawState_Nothing);
|
||||
mGoToJail = false;
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||
|
|
Loading…
Reference in a new issue