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!;
|
[Dependency] private readonly FixtureSystem _fixtures = default!;
|
||||||
|
|
||||||
public const string DeleteFixture = "DeleteCircle";
|
public const string DeleteFixture = "DeleteCircle";
|
||||||
|
public const string CollideFixture = "ColliderCircle";
|
||||||
|
|
||||||
private float GetFalloff(int level)
|
private float GetFalloff(int level)
|
||||||
{
|
{
|
||||||
@@ -115,9 +116,10 @@ namespace Content.Shared.Singularity
|
|||||||
appearance.SetData(SingularityVisuals.Level, value);
|
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))
|
if (EntityManager.TryGetComponent(singularity.Owner, out SingularityDistortionComponent? distortion))
|
||||||
|
|||||||
@@ -19,10 +19,19 @@
|
|||||||
radius: 0.5
|
radius: 0.5
|
||||||
restitution: 0.9
|
restitution: 0.9
|
||||||
mass: 99999
|
mass: 99999
|
||||||
|
hard: false
|
||||||
mask:
|
mask:
|
||||||
- AllMask
|
- AllMask
|
||||||
layer:
|
layer:
|
||||||
- AllMask
|
- AllMask
|
||||||
|
- id: ColliderCircle
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeCircle
|
||||||
|
radius: 0.5
|
||||||
|
restitution: 0.9
|
||||||
|
mass: 99999
|
||||||
|
mask:
|
||||||
|
- FullTileMask
|
||||||
- type: Singularity
|
- type: Singularity
|
||||||
radsPerLevel: 1 # determines RadiationPulse's radiation per second.
|
radsPerLevel: 1 # determines RadiationPulse's radiation per second.
|
||||||
- type: SingularityDistortion
|
- type: SingularityDistortion
|
||||||
|
|||||||
Reference in New Issue
Block a user