mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 16:45:34 +00:00
Don't allow telekinesis on activators
This commit is contained in:
parent
b29e9e9c77
commit
574e40db5e
1 changed files with 4 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue