Removed collision from wall gaps
This commit is contained in:
@@ -176,7 +176,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
Body targetBody = Submarine.PickBody(rayStart, rayEnd, ignoredBodies,
|
||||
Physics.CollisionWall | Physics.CollisionCharacter | Physics.CollisionItem | Physics.CollisionLevel, false);
|
||||
Physics.CollisionWall | Physics.CollisionCharacter | Physics.CollisionItem | Physics.CollisionLevel | Physics.CollisionRepair, false);
|
||||
|
||||
if (targetBody == null || targetBody.UserData == null) return;
|
||||
|
||||
|
||||
@@ -774,7 +774,12 @@ namespace Barotrauma
|
||||
|
||||
//if the section has holes (or is just one big hole with no bodies),
|
||||
//we need a sensor for repairtools to be able to target the structure
|
||||
if (hasHoles || !bodies.Any()) CreateRectBody(rect).IsSensor = true;
|
||||
if (hasHoles || !bodies.Any())
|
||||
{
|
||||
Body sensorBody = CreateRectBody(rect);
|
||||
sensorBody.CollisionCategories = Physics.CollisionRepair;
|
||||
sensorBody.IsSensor = true;
|
||||
}
|
||||
}
|
||||
|
||||
private Body CreateRectBody(Rectangle rect)
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Barotrauma
|
||||
public const Category CollisionItem = Category.Cat5;
|
||||
public const Category CollisionProjectile = Category.Cat6;
|
||||
public const Category CollisionLevel = Category.Cat7;
|
||||
public const Category CollisionRepair = Category.Cat8;
|
||||
|
||||
public static float DisplayToRealWorldRatio = 1.0f / 80.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user