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:
parent
5d30ba0abd
commit
341ec28b1f
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue