From 33eb8cb7fd6ae265ebc233a4a778134abd5aef6f Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 28 Aug 2022 10:14:31 +0200 Subject: [PATCH] fix #3540, update changelog --- changelog.md | 2 ++ src/main/scala/li/cil/oc/server/component/MotionSensor.scala | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index cefe7844db..95d5399c42 100644 --- a/changelog.md +++ b/changelog.md @@ -41,6 +41,7 @@ * Fixed: [#2911] Inconsistent values used by getGameType() and setGameType() in Debug Card. * (1.12.2) Fixed: [#3472] Incorrect 3D print lighting. * Fixed: [#3226] Incorrect Hard Drive reported maximum stack size when formatted. +* Fixed: [#3084] Incorrect parsing of the 'maxSignalQueueSize' configuration option. * Fixed: [#3184] Incorrect redstone card sides inside racks and computers. * Fixed: [#3182] Incorrect reporting of entity inventory names in Transposer, plus other Transposer interaction issues. * Fixed: Missing null check for Blood Magic integration. @@ -48,6 +49,7 @@ * Fixed: [#3249] NullPointerException when remote terminal is missing. * Fixed: [#3401] 'rawSetForeground', 'rawSetBackground' not working correctly. * Fixed: [#3265] Relay 'setStrength' unlimited upper bound. (JamesOrdner) +* (1.7.10) Fixed: [#3540] Server-side crash with Motion Sensor * Fixed: [#1999] 'string.gsub' patterns now allow numbers. * Fixed: [#3195] Tier 1 Wireless Cards not receiving messages. * (1.7.10) Fixed: [#3239] Unnecessary/unwanted canEntityDestroy check in OpenComputers fake player. diff --git a/src/main/scala/li/cil/oc/server/component/MotionSensor.scala b/src/main/scala/li/cil/oc/server/component/MotionSensor.scala index ff5b566fa3..fc9dfa2632 100644 --- a/src/main/scala/li/cil/oc/server/component/MotionSensor.scala +++ b/src/main/scala/li/cil/oc/server/component/MotionSensor.scala @@ -111,7 +111,7 @@ class MotionSensor(val host: EnvironmentHost) extends prefab.ManagedEnvironment // is pseudo-infrared driven (it only works for *living* entities, after // all), so I think it makes more sense for it to work in the dark, too. /* entity.getBrightness(0) > 0.2 && */ { - val target = entity.getPosition(1.0F) + val target = Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ) isClearPath(target) || isClearPath(target.addVector(0, entity.getEyeHeight, 0)) }