Use PredictedQueueDel in SharedDestructibleSystem.DestroyEntity (#40856)
feat: predict queuedel in SharedDestructibleSystem.DestroyEntity Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
namespace Content.Shared.Destructible;
|
||||
namespace Content.Shared.Destructible;
|
||||
|
||||
public abstract class SharedDestructibleSystem : EntitySystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Force entity to be destroyed and deleted.
|
||||
/// Force entity to be destroyed and deleted.
|
||||
/// </summary>
|
||||
public bool DestroyEntity(EntityUid owner)
|
||||
{
|
||||
@@ -15,12 +15,12 @@ public abstract class SharedDestructibleSystem : EntitySystem
|
||||
var eventArgs = new DestructionEventArgs();
|
||||
RaiseLocalEvent(owner, eventArgs);
|
||||
|
||||
QueueDel(owner);
|
||||
PredictedQueueDel(owner);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force entity to break.
|
||||
/// Force entity to break.
|
||||
/// </summary>
|
||||
public void BreakEntity(EntityUid owner)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ public abstract class SharedDestructibleSystem : EntitySystem
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised before an entity is about to be destroyed and deleted
|
||||
/// Raised before an entity is about to be destroyed and deleted
|
||||
/// </summary>
|
||||
public sealed class DestructionAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
@@ -38,7 +38,7 @@ public sealed class DestructionAttemptEvent : CancellableEntityEventArgs
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when entity is destroyed and about to be deleted.
|
||||
/// Raised when entity is destroyed and about to be deleted.
|
||||
/// </summary>
|
||||
public sealed class DestructionEventArgs : EntityEventArgs
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public sealed class DestructionEventArgs : EntityEventArgs
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raised when entity was heavy damage and about to break.
|
||||
/// Raised when entity was heavy damage and about to break.
|
||||
/// </summary>
|
||||
public sealed class BreakageEventArgs : EntityEventArgs
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user