Fix thrown items colliding with non-hard entities (#8243)
* Fix pies colliding with non-hard(puddles) * Fix thrown items colliding with tables
This commit is contained in:
@@ -63,12 +63,15 @@ namespace Content.Shared.Throwing
|
||||
}
|
||||
var fixture = fixturesComponent.Fixtures.Values.First();
|
||||
var shape = fixture.Shape;
|
||||
var throwingFixture = new Fixture(physicsComponent, shape) { CollisionLayer = (int) CollisionGroup.ThrownItem, Hard = false, ID = ThrowingFixture };
|
||||
var throwingFixture = new Fixture(physicsComponent, shape) { CollisionMask = (int) CollisionGroup.ThrownItem, Hard = false, ID = ThrowingFixture };
|
||||
_fixtures.TryCreateFixture(physicsComponent, throwingFixture, manager: fixturesComponent);
|
||||
}
|
||||
|
||||
private void HandleCollision(EntityUid uid, ThrownItemComponent component, StartCollideEvent args)
|
||||
{
|
||||
if (args.OtherFixture.Hard == false)
|
||||
return;
|
||||
|
||||
var thrower = component.Thrower;
|
||||
var otherBody = args.OtherFixture.Body;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user