v1.7.7.0 (Winter Update 2024)
This commit is contained in:
@@ -443,10 +443,10 @@ namespace Barotrauma.Lights
|
||||
|
||||
public bool Intersects(Rectangle rect)
|
||||
{
|
||||
if (!Enabled) return false;
|
||||
if (!Enabled) { return false; }
|
||||
|
||||
Rectangle transformedBounds = BoundingBox;
|
||||
if (ParentEntity != null && ParentEntity.Submarine != null)
|
||||
if (ParentEntity is { Submarine: not null })
|
||||
{
|
||||
transformedBounds.X += (int)ParentEntity.Submarine.Position.X;
|
||||
transformedBounds.Y += (int)ParentEntity.Submarine.Position.Y;
|
||||
|
||||
Reference in New Issue
Block a user