From 341ec28b1fb0f5cf99c5b1f99a87360bea1ada7a Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 26 Feb 2017 15:33:44 +0200 Subject: [PATCH] [Client] Don't allow actors to cast spells that don't exist on client --- apps/openmw/mwworld/worldimp.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index f7ca2c893..acd3dd0b0 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2744,6 +2744,18 @@ namespace MWWorld if (!selectedSpell.empty()) { + /* + Start of tes3mp addition + + If the spell being cast does not exist on our client, ignore it + to avoid framelistener errors + */ + if (getStore().get().search(selectedSpell) == 0) + return false; + /* + End of tes3mp addition + */ + const ESM::Spell* spell = getStore().get().find(selectedSpell); // Check mana