feat(runtime): atomically replace collision generations
This commit is contained in:
parent
99bf1751bb
commit
9b0f59bd1b
21 changed files with 2435 additions and 408 deletions
|
|
@ -73,22 +73,20 @@ public sealed class LandblockPresentationRetirementOwner
|
|||
static entity => entity.ServerGuid == 0,
|
||||
_staticPresentation.RemovePluginProjection);
|
||||
|
||||
if (!ticket.RunOnce(
|
||||
LandblockRetirementStage.Physics,
|
||||
() => ticket.Kind == LandblockRetirementKind.Full
|
||||
? _physics.AdvanceRemoval(ticket.LandblockId)
|
||||
: _physics.AdvanceDemotion(ticket.LandblockId)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (ticket.Kind == LandblockRetirementKind.Full)
|
||||
{
|
||||
ticket.RunOnce(
|
||||
LandblockRetirementStage.Terrain,
|
||||
() => _render.RemoveTerrain(ticket.LandblockId));
|
||||
}
|
||||
|
||||
ticket.RunOnce(
|
||||
LandblockRetirementStage.Physics,
|
||||
() =>
|
||||
{
|
||||
if (ticket.Kind == LandblockRetirementKind.Full)
|
||||
_physics.RemoveLandblock(ticket.LandblockId);
|
||||
else
|
||||
_physics.DemoteToTerrain(ticket.LandblockId);
|
||||
});
|
||||
ticket.RunOnce(
|
||||
LandblockRetirementStage.CellVisibility,
|
||||
() => _render.RemoveCellVisibility(ticket.LandblockId));
|
||||
|
|
@ -128,13 +126,9 @@ public sealed class LandblockPresentationRetirementOwner
|
|||
LandblockRetirementStage.Physics =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.Physics,
|
||||
() =>
|
||||
{
|
||||
if (ticket.Kind == LandblockRetirementKind.Full)
|
||||
_physics.RemoveLandblock(ticket.LandblockId);
|
||||
else
|
||||
_physics.DemoteToTerrain(ticket.LandblockId);
|
||||
}),
|
||||
() => ticket.Kind == LandblockRetirementKind.Full
|
||||
? _physics.AdvanceRemoval(ticket.LandblockId)
|
||||
: _physics.AdvanceDemotion(ticket.LandblockId)),
|
||||
LandblockRetirementStage.CellVisibility =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.CellVisibility,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue