1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2026-01-04 18:33:07 +00:00

[Client] Don't allow players to attack while in persuasion dialogue

This commit is contained in:
David Cernat 2019-11-30 20:05:20 +02:00
parent 397cdf400b
commit 5575242299

View file

@ -376,6 +376,17 @@ namespace MWInput
else
{
/*
Start of tes3mp addition
Prevent players from starting attacks while in the persuasion submenu in dialogue
*/
if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Dialogue))
return;
/*
End of tes3mp addition
*/
MWMechanics::DrawState_ state = MWBase::Environment::get().getWorld()->getPlayer().getDrawState();
mPlayer->setAttackingOrSpell(currentValue != 0 && state != MWMechanics::DrawState_Nothing);
}