Release v0.15.13.0
This commit is contained in:
@@ -213,9 +213,8 @@ namespace Barotrauma
|
||||
};
|
||||
PhysicsBody.FarseerBody.OnCollision += PhysicsBody_OnCollision;
|
||||
PhysicsBody.FarseerBody.OnSeparation += PhysicsBody_OnSeparation;
|
||||
PhysicsBody.FarseerBody.SetIsSensor(true);
|
||||
PhysicsBody.FarseerBody.SetIsSensor(element.GetAttributeBool("sensor", true));
|
||||
PhysicsBody.FarseerBody.BodyType = BodyType.Static;
|
||||
PhysicsBody.FarseerBody.BodyType = BodyType.Kinematic;
|
||||
|
||||
ColliderRadius = ConvertUnits.ToDisplayUnits(Math.Max(Math.Max(PhysicsBody.radius, PhysicsBody.width / 2.0f), PhysicsBody.height / 2.0f));
|
||||
|
||||
@@ -532,10 +531,9 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerOnce)
|
||||
if (triggerOnce && triggeredOnce)
|
||||
{
|
||||
if (triggeredOnce) { return; }
|
||||
if (triggerers.Count > 0) { triggeredOnce = true; }
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Entity triggerer in triggerers)
|
||||
@@ -577,6 +575,12 @@ namespace Barotrauma
|
||||
GameMain.GameScreen.Cam.Shake = Math.Max(GameMain.GameScreen.Cam.Shake, cameraShake);
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerOnce && triggerers.Count > 0)
|
||||
{
|
||||
PhysicsBody.Enabled = false;
|
||||
triggeredOnce = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveDistantTriggerers(PhysicsBody physicsBody, HashSet<Entity> triggerers, Vector2 calculateDistanceTo)
|
||||
|
||||
Reference in New Issue
Block a user