feat(runtime): own initial create residence transaction
This commit is contained in:
parent
74103f75b5
commit
38fd4b8dc9
10 changed files with 3031 additions and 17 deletions
|
|
@ -118,6 +118,35 @@ public class PhysicsTimestampGateTests
|
|||
Assert.True(gate.TryAcceptMovementEvent(4, 0x9011, 2));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PreviewCreateObject_MatchesSeedDispositionWithoutMutation()
|
||||
{
|
||||
var gate = new PhysicsTimestampGate();
|
||||
|
||||
Assert.Equal(CreateObjectTimestampDisposition.InitialGeneration,
|
||||
gate.PreviewCreateObject(instance: 7));
|
||||
Assert.Equal(CreateObjectTimestampDisposition.InitialGeneration,
|
||||
gate.SeedForCreateObject(10, 20, 30, 40, 50, 60, 70, 80, 7));
|
||||
|
||||
Assert.Equal(CreateObjectTimestampDisposition.ExistingGeneration,
|
||||
gate.PreviewCreateObject(instance: 7));
|
||||
Assert.Equal(CreateObjectTimestampDisposition.NewGeneration,
|
||||
gate.PreviewCreateObject(instance: 8));
|
||||
Assert.Equal(CreateObjectTimestampDisposition.StaleGeneration,
|
||||
gate.PreviewCreateObject(instance: 6));
|
||||
|
||||
// Preview is observational: all timestamp channels still compare
|
||||
// against the original instance-seven seed afterward.
|
||||
Assert.True(gate.TryAcceptMovementEvent(
|
||||
instance: 7,
|
||||
movement: 21,
|
||||
serverControlledMove: 60));
|
||||
Assert.False(gate.TryAcceptMovementEvent(
|
||||
instance: 8,
|
||||
movement: 22,
|
||||
serverControlledMove: 60));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SameGenerationCreateObject_MixedChannelsAreAcceptedIndependently()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue