fix(physics): seal collision generations before activation
This commit is contained in:
parent
be94bc9b06
commit
d94145e6b8
15 changed files with 1556 additions and 410 deletions
|
|
@ -976,6 +976,43 @@ public sealed class LandblockPhysicsPublisherTests
|
|||
new Dictionary<uint, GfxObj>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReloadedSeamAtomicallyRestoresAdjacentStaticAndClearsRepairMarker()
|
||||
{
|
||||
var fixture = Fixture();
|
||||
CacheCylinderSetup(fixture.Cache);
|
||||
WorldEntity neighbor = CylinderEntity(
|
||||
0x80AAB401u,
|
||||
new Vector3(192.25f, 12f, 0f));
|
||||
Publish(fixture.Publisher, Build(FirstLandblock));
|
||||
Publish(fixture.Publisher, Build(AdjacentLandblock, [neighbor]));
|
||||
Assert.True(fixture.Engine.ShadowObjects.HasOwnerRowsInLandblock(
|
||||
neighbor.Id,
|
||||
FirstLandblock));
|
||||
|
||||
fixture.Publisher.RemoveLandblock(FirstLandblock);
|
||||
|
||||
Assert.Equal(1, fixture.Engine.ShadowObjects.WithdrawnPrefixMarkerCount);
|
||||
Assert.False(fixture.Engine.ShadowObjects.HasOwnerRowsInLandblock(
|
||||
neighbor.Id,
|
||||
FirstLandblock));
|
||||
LandblockPhysicsPublication pending = Begin(
|
||||
fixture.Publisher,
|
||||
Build(FirstLandblock));
|
||||
Assert.Equal(1, fixture.Engine.ShadowObjects.WithdrawnPrefixMarkerCount);
|
||||
|
||||
fixture.Publisher.CompletePublication(pending);
|
||||
|
||||
Assert.Equal(0, fixture.Engine.ShadowObjects.WithdrawnPrefixMarkerCount);
|
||||
Assert.True(fixture.Engine.ShadowObjects.HasOwnerRowsInLandblock(
|
||||
neighbor.Id,
|
||||
FirstLandblock));
|
||||
Assert.True(fixture.Engine.ShadowObjects.HasOwnerRowsInLandblock(
|
||||
neighbor.Id,
|
||||
AdjacentLandblock));
|
||||
Assert.Equal(1, fixture.Engine.ShadowObjects.RetainedRegistrationCount);
|
||||
}
|
||||
|
||||
private static LandblockCollisionBuild FlatCellClosure(
|
||||
PhysicsDatBundle bundle,
|
||||
uint envCellId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue