1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

[Client] Don't start dialogue via client scripts if already in dialogue

This prevents infinite greeting spam in scripts such as hlormarScript.
This commit is contained in:
David Cernat 2017-07-26 22:37:57 +03:00
parent e6e5d406b8
commit 2f551aba02

View file

@ -5,6 +5,7 @@
Include additional headers for multiplayer purposes
*/
#include "../mwbase/windowmanager.hpp"
#include "../mwmp/Main.hpp"
#include "../mwmp/LocalPlayer.hpp"
/*
@ -178,7 +179,17 @@ namespace MWScript
if (!ptr.getRefData().isEnabled())
return;
/*
Start of tes3mp change (major)
Don't start a dialogue if the target is already engaged in one, thus
preventing infinite greeting loops
*/
if (!MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Dialogue))
MWBase::Environment::get().getDialogueManager()->startDialogue(ptr);
/*
End of tes3mp change (major)
*/
}
};