From 56f084c9c0ec3413a39dfeb174daab0035137136 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 15 Sep 2019 16:10:09 +0300 Subject: [PATCH] [Client] Fix packet spam for repetitive setting of the same global value --- apps/openmw/mwscript/interpretercontext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 8f347ed3a..212bf8365 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -320,6 +320,16 @@ namespace MWScript void InterpreterContext::setGlobalShort (const std::string& name, int value) { + /* + Start of tes3mp addition + + Avoid setting a global to a value it already is, preventing packet spam + */ + if (getGlobalFloat(name) == value) return; + /* + End of tes3mp addition + */ + /* Start of tes3mp addition