From 574e40db5e34ebd0827b21be52c4f35f24ca0aaa Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 4 Jul 2016 01:50:47 +0900 Subject: [PATCH] Don't allow telekinesis on activators --- apps/openmw/mwworld/worldimp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 5bc38005d..6915a389c 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1025,7 +1025,10 @@ namespace MWWorld float activationDistance = getMaxActivationDistance() + telekinesisRangeBonus; facedObject = getFacedObject(activationDistance); - if (!facedObject.isEmpty() && !facedObject.getClass().isActor() && !facedObject.getCellRef().getTeleport()) + + // Not allowing telekinesis on actors, on doors that teleport to other cells, or on activators + // Original engine doesn't allow telekinesis on books or lights, either + if (!facedObject.isEmpty() && !facedObject.getClass().isActor() && !facedObject.getCellRef().getTeleport() && facedObject.getClass().getTypeName() != "struct ESM::Activator") return facedObject; else facedObject = getFacedObject(getMaxActivationDistance());