1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-29 19:06:41 +00:00

Don't play touch spell explosions on non-activatable statics

This commit is contained in:
Allofich 2016-09-23 01:58:12 +09:00
parent eecf412b85
commit 0c603e986d

View file

@ -3187,6 +3187,9 @@ namespace MWWorld
if (effectIt->mRange != rangeType || (effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor())) if (effectIt->mRange != rangeType || (effectIt->mArea <= 0 && !ignore.isEmpty() && ignore.getClass().isActor()))
continue; // Not right range type, or not area effect and hit an actor continue; // Not right range type, or not area effect and hit an actor
if (effectIt->mRange == ESM::RT_Touch && (!ignore.isEmpty()) && (!ignore.getClass().isActor() && !ignore.getClass().canBeActivated(ignore)))
continue; // Don't play explosion for touch spells on non-activatable objects
// Spawn the explosion orb effect // Spawn the explosion orb effect
const ESM::Static* areaStatic; const ESM::Static* areaStatic;
if (!effect->mArea.empty()) if (!effect->mArea.empty())