forked from teamnwah/openmw-tes3coop
[Client] Don't allow actors to cast spells that don't exist on client
This commit is contained in:
parent
5d30ba0abd
commit
341ec28b1f
1 changed files with 12 additions and 0 deletions
|
@ -2744,6 +2744,18 @@ namespace MWWorld
|
||||||
|
|
||||||
if (!selectedSpell.empty())
|
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<ESM::Spell>().search(selectedSpell) == 0)
|
||||||
|
return false;
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
|
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
|
||||||
|
|
||||||
// Check mana
|
// Check mana
|
||||||
|
|
Loading…
Reference in a new issue