]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix thrown item prediction weirdness (#35843)
authorTayrtahn <tayrtahn@gmail.com>
Sat, 15 Mar 2025 06:06:00 +0000 (02:06 -0400)
committerGitHub <noreply@github.com>
Sat, 15 Mar 2025 06:06:00 +0000 (17:06 +1100)
Don't predict thrown item landing/stopping

Content.Shared/Throwing/ThrownItemSystem.cs

index 3d81cc96e4219779ed5bdb5f6c23a9877e1fc3b5..236e91aec6f8e3ed8508d930178083165278b584 100644 (file)
@@ -145,6 +145,12 @@ namespace Content.Shared.Throwing
         {
             base.Update(frameTime);
 
+            // TODO predicted throwing - remove this check
+            // We don't want to predict landing or stopping, since throwing isn't actually predicted.
+            // If we do, the landing/stop will occur prematurely on the client.
+            if (_gameTiming.InPrediction)
+                return;
+
             var query = EntityQueryEnumerator<ThrownItemComponent, PhysicsComponent>();
             while (query.MoveNext(out var uid, out var thrown, out var physics))
             {