feat(content): bake and read flat collision assets
Append strict collision/topology payloads to the existing prepared package so later physics cutover can drop parsed DAT graphs without adding a second mapping or changing traversal behavior. The full 2,232,170-key catalog is deterministic across worker counts, exact-byte aliased, corruption-isolated, and cancellation-safe.
This commit is contained in:
parent
d9300c7854
commit
9cd42417a8
29 changed files with 2868 additions and 63 deletions
24
tests/AcDream.Bake.Tests/ExactPayloadAliasCatalogTests.cs
Normal file
24
tests/AcDream.Bake.Tests/ExactPayloadAliasCatalogTests.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
namespace AcDream.Bake.Tests;
|
||||
|
||||
public sealed class ExactPayloadAliasCatalogTests
|
||||
{
|
||||
[Fact]
|
||||
public void AliasRequiresCompleteByteEquality()
|
||||
{
|
||||
var catalog = new ExactPayloadAliasCatalog();
|
||||
byte[] primary = [1, 2, 3, 4, 5];
|
||||
catalog.Add(0x1234UL, primary);
|
||||
|
||||
Assert.True(catalog.TryFind(
|
||||
[1, 2, 3, 4, 5],
|
||||
out ulong primaryKey));
|
||||
Assert.Equal(0x1234UL, primaryKey);
|
||||
|
||||
Assert.False(catalog.TryFind(
|
||||
[1, 2, 3, 4, 4],
|
||||
out _));
|
||||
Assert.False(catalog.TryFind(
|
||||
[1, 2, 3, 4, 5, 0],
|
||||
out _));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue