1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 21:45:33 +00:00

[Client] Don't allow actors to cast spells that don't exist on client

This commit is contained in:
David Cernat 2017-02-26 15:33:44 +02:00
parent 5d30ba0abd
commit 341ec28b1f

View file

@ -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<ESM::Spell>().search(selectedSpell) == 0)
return false;
/*
End of tes3mp addition
*/
const ESM::Spell* spell = getStore().get<ESM::Spell>().find(selectedSpell);
// Check mana