Fixes the singularity bouncing off the station. (#8452)
* Fixes the singularity bouncing off the station. * Update Content.Shared/Singularity/SharedSingularitySystem.cs Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Content.Shared.Singularity
|
||||
[Dependency] private readonly FixtureSystem _fixtures = default!;
|
||||
|
||||
public const string DeleteFixture = "DeleteCircle";
|
||||
public const string CollideFixture = "ColliderCircle";
|
||||
|
||||
private float GetFalloff(int level)
|
||||
{
|
||||
@@ -115,9 +116,10 @@ namespace Content.Shared.Singularity
|
||||
appearance.SetData(SingularityVisuals.Level, value);
|
||||
}
|
||||
|
||||
if (physics != null && _fixtures.GetFixtureOrNull(physics, DeleteFixture) is {Shape: PhysShapeCircle circle})
|
||||
if (physics != null && _fixtures.GetFixtureOrNull(physics, DeleteFixture) is {Shape: PhysShapeCircle deleteCircle} && _fixtures.GetFixtureOrNull(physics, CollideFixture) is {Shape: PhysShapeCircle collideCircle})
|
||||
{
|
||||
circle.Radius = value - 0.5f;
|
||||
deleteCircle.Radius = value - 0.5f;
|
||||
collideCircle.Radius = value;
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(singularity.Owner, out SingularityDistortionComponent? distortion))
|
||||
|
||||
Reference in New Issue
Block a user