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:
parent
e6e5d406b8
commit
2f551aba02
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue