feat(net): port retail physics spawn and event timestamps
Parse the complete PhysicsDesc plus F754/F755 packets, correct every PhysicsState bit, and gate all nine retail update channels with generation-safe immutable snapshots. Preserve ForcePosition, teleport, placement, velocity, parent, pickup, delete, and same-generation CreateObject ordering from the named client. Separate accepted logical lifecycle notifications from retained UI qualities, make GUID replacement and session reset clear every projection exactly once, and add packet, wraparound, malformed-input, parent FIFO, canonical-position, reconnect, and GUID-reuse conformance coverage. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
d53fe30ffe
commit
8a5d77f7f4
50 changed files with 3809 additions and 649 deletions
|
|
@ -5,6 +5,25 @@ namespace AcDream.Core.Tests.Selection;
|
|||
|
||||
public sealed class SelectionStateTests
|
||||
{
|
||||
[Fact]
|
||||
public void ResetClearsCurrentAndSelectionHistoryForNextSession()
|
||||
{
|
||||
var state = new SelectionState();
|
||||
state.Select(0x50000001u, SelectionChangeSource.World);
|
||||
state.Select(0x50000002u, SelectionChangeSource.World);
|
||||
SelectionTransition transition = default;
|
||||
state.Changed += value => transition = value;
|
||||
|
||||
Assert.True(state.Reset());
|
||||
|
||||
Assert.Null(state.SelectedObjectId);
|
||||
Assert.Null(state.PreviousObjectId);
|
||||
Assert.Null(state.PreviousValidObjectId);
|
||||
Assert.Equal(0x50000002u, transition.PreviousObjectId);
|
||||
Assert.Equal(SelectionChangeReason.SessionReset, transition.Reason);
|
||||
Assert.False(state.SelectPrevious());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Select_CommitsOneTransitionAndTracksPreviousLikeRetail()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue