mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Merge branch '6303-jail-stuck-attack' into 'master'
#6303 Made player stop attacking and sheathe weapon when going to jail See merge request OpenMW/openmw!1551
This commit is contained in:
commit
fd7e0b74cc
@ -72,6 +72,7 @@
|
|||||||
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
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 #6291: Can't pickup the dead mage's journal from the mysterious hunter mod
|
||||||
Bug #6302: Teleporting disabled actor breaks its disabled state
|
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 #6307: Pathfinding in Infidelities quest from Tribunal addon is broken
|
||||||
Bug #6321: Arrow enchantments should always be applied to the target
|
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
|
Bug #6322: Total sold/cost should reset to 0 when there are no items offered
|
||||||
|
@ -3620,14 +3620,13 @@ namespace MWWorld
|
|||||||
|
|
||||||
void World::goToJail()
|
void World::goToJail()
|
||||||
{
|
{
|
||||||
|
const MWWorld::Ptr player = getPlayerPtr();
|
||||||
if (!mGoToJail)
|
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)
|
// 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;
|
mGoToJail = true;
|
||||||
mPlayerInJail = true;
|
mPlayerInJail = true;
|
||||||
|
|
||||||
MWWorld::Ptr player = getPlayerPtr();
|
|
||||||
|
|
||||||
int bounty = player.getClass().getNpcStats(player).getBounty();
|
int bounty = player.getClass().getNpcStats(player).getBounty();
|
||||||
player.getClass().getNpcStats(player).setBounty(0);
|
player.getClass().getNpcStats(player).setBounty(0);
|
||||||
mPlayer->recordCrimeId();
|
mPlayer->recordCrimeId();
|
||||||
@ -3640,6 +3639,12 @@ namespace MWWorld
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (MWBase::Environment::get().getMechanicsManager()->isAttackPreparing(player))
|
||||||
|
{
|
||||||
|
mPlayer->setAttackingOrSpell(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
mPlayer->setDrawState(MWMechanics::DrawState_Nothing);
|
||||||
mGoToJail = false;
|
mGoToJail = false;
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user