Unstable 0.15.15.0 (and the one before it I forgor)

This commit is contained in:
Markus Isberg
2021-11-18 21:34:30 +09:00
parent 10e5fd5f3e
commit 80f39cd2a3
257 changed files with 4916 additions and 2582 deletions
@@ -131,6 +131,13 @@ namespace Barotrauma.Items.Components
set;
}
[Serialize(true, true, description: "Should the sensor trigger when the item itself moves.")]
public bool DetectOwnMotion
{
get;
set;
}
public MotionSensor(Item item, XElement element)
: base(item, element)
{
@@ -168,7 +175,7 @@ namespace Barotrauma.Items.Components
MotionDetected = false;
updateTimer = UpdateInterval;
if (item.body != null && item.body.Enabled)
if (item.body != null && item.body.Enabled && DetectOwnMotion)
{
if (Math.Abs(item.body.LinearVelocity.X) > MinimumVelocity || Math.Abs(item.body.LinearVelocity.Y) > MinimumVelocity)
{