]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use PredictedQueueDel in SharedDestructibleSystem.DestroyEntity (#40856)
authorFildrance <fildrance@gmail.com>
Sun, 12 Oct 2025 17:54:08 +0000 (20:54 +0300)
committerGitHub <noreply@github.com>
Sun, 12 Oct 2025 17:54:08 +0000 (17:54 +0000)
feat: predict queuedel in SharedDestructibleSystem.DestroyEntity

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Content.Shared/Destructible/SharedDestructibleSystem.cs

index 572ed9d560e06fef139fff0729a41fd424d537d0..f37561e0d8ff66b32366836d8af0d61bccb6d84a 100644 (file)
@@ -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
 {