From a695a527f06cdf60e51dc23794373d3c46325d3a Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 8 Mar 2025 14:49:13 +1100 Subject: [PATCH] Update b2dynamictree (#30630) --- Content.Benchmarks/DynamicTreeBenchmark.cs | 2 +- .../Tests/Construction/Interaction/CraftingTests.cs | 3 +++ .../Tests/Interaction/InteractionTest.Helpers.cs | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Content.Benchmarks/DynamicTreeBenchmark.cs b/Content.Benchmarks/DynamicTreeBenchmark.cs index 4f3dad4073..9086b4d3ac 100644 --- a/Content.Benchmarks/DynamicTreeBenchmark.cs +++ b/Content.Benchmarks/DynamicTreeBenchmark.cs @@ -44,7 +44,7 @@ namespace Content.Benchmarks for (var i = 0; i < Aabbs1.Length; i++) { var aabb = Aabbs1[i]; - _b2Tree.CreateProxy(aabb, i); + _b2Tree.CreateProxy(aabb, uint.MaxValue, i); _tree.Add(i); } } diff --git a/Content.IntegrationTests/Tests/Construction/Interaction/CraftingTests.cs b/Content.IntegrationTests/Tests/Construction/Interaction/CraftingTests.cs index 74d0e92421..05e8197c8d 100644 --- a/Content.IntegrationTests/Tests/Construction/Interaction/CraftingTests.cs +++ b/Content.IntegrationTests/Tests/Construction/Interaction/CraftingTests.cs @@ -54,6 +54,9 @@ public sealed class CraftingTests : InteractionTest await CraftItem(Spear); await FindEntity(Spear); + // Reset target because entitylookup will dump this. + Target = null; + // Player's hands should be full of the remaining rods, except those dropped during the failed crafting attempt. // Spear and left over stacks should be on the floor. await AssertEntityLookup((Rod, 2), (Cable, 7), (ShardGlass, 2), (Spear, 1)); diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs index d431c440a2..a61f7c3ec8 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs @@ -62,7 +62,10 @@ public abstract partial class InteractionTest // Please someone purge async construction code Task task = default!; - await Server.WaitPost(() => task = SConstruction.TryStartItemConstruction(prototype, SEntMan.GetEntity(Player))); + await Server.WaitPost(() => + { + task = SConstruction.TryStartItemConstruction(prototype, SEntMan.GetEntity(Player)); + }); Task? tickTask = null; while (!task.IsCompleted)