Remove ICollideSpecial
Handled in an ECS way by PreventCollideEvent. The disposals one doesn't work anyway and would've required a larger refactor of disposals to fix so out of scope.
This commit is contained in:
@@ -15,11 +15,9 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.GameObjects.Components.Projectiles
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedProjectileComponent))]
|
||||
public class ProjectileComponent : SharedProjectileComponent, IStartCollide
|
||||
{
|
||||
protected override EntityUid Shooter => _shooter;
|
||||
|
||||
private EntityUid _shooter = EntityUid.Invalid;
|
||||
|
||||
[DataField("damages")] private Dictionary<DamageType, int> _damages = new();
|
||||
|
||||
@@ -49,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
/// <param name="shooter"></param>
|
||||
public void IgnoreEntity(IEntity shooter)
|
||||
{
|
||||
_shooter = shooter.Uid;
|
||||
Shooter = shooter.Uid;
|
||||
Dirty();
|
||||
}
|
||||
|
||||
@@ -77,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
|
||||
if (damage != null)
|
||||
{
|
||||
Owner.EntityManager.TryGetEntity(_shooter, out var shooter);
|
||||
Owner.EntityManager.TryGetEntity(Shooter, out var shooter);
|
||||
|
||||
foreach (var (damageType, amount) in _damages)
|
||||
{
|
||||
@@ -100,7 +98,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new ProjectileComponentState(NetID!.Value, _shooter, IgnoreShooter);
|
||||
return new ProjectileComponentState(Shooter, IgnoreShooter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user