From 0582f2d91822339341ecb7847ad797748a1457b4 Mon Sep 17 00:00:00 2001 From: Allofich Date: Fri, 23 Sep 2016 20:35:22 +0900 Subject: [PATCH] Adjust touch spell/telekinesis interaction --- apps/openmw/mwworld/worldimp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index af0551e69..328a67ecb 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2669,15 +2669,15 @@ namespace MWWorld { target = result1.mHitObject; hitPosition = result1.mHitPos; - if (!target.isEmpty() && dist1 > getMaxActivationDistance() && !target.getClass().allowTelekinesis(target)) - target = NULL; + if (dist1 > getMaxActivationDistance() && !target.isEmpty() && (target.getClass().isActor() || !target.getClass().canBeActivated(target))) + target = NULL; } else if (result2.mHit) { target = result2.mHitObject; hitPosition = result2.mHitPointWorld; - if (!target.isEmpty() && dist2 > getMaxActivationDistance() && !target.getClass().allowTelekinesis(target)) - target = NULL; + if (dist2 > getMaxActivationDistance() && !target.isEmpty() && (target.getClass().isActor() || !target.getClass().canBeActivated(target))) + target = NULL; } // When targeting an actor that is in combat with an "on touch" spell,