refactor(runtime): own world reveal generation
This commit is contained in:
parent
4ab98b080e
commit
a6860d5563
26 changed files with 1294 additions and 502 deletions
|
|
@ -10,6 +10,7 @@ using AcDream.Core.Net.Messages;
|
|||
using AcDream.Core.Physics;
|
||||
using AcDream.Core.Rendering;
|
||||
using AcDream.Core.World;
|
||||
using AcDream.Runtime;
|
||||
|
||||
namespace AcDream.App.Streaming;
|
||||
|
||||
|
|
@ -668,7 +669,7 @@ internal sealed class LocalPlayerTeleportController
|
|||
// Retail SmartBox enters blocking_for_cells before old-world object,
|
||||
// physics, landscape, and ambient owners may advance again. Begin the
|
||||
// reveal generation before a recenter can start detaching that world.
|
||||
_worldReveal.Begin(WorldRevealKind.Portal, position.LandblockId);
|
||||
_worldReveal.Begin(RuntimePortalKind.Portal, position.LandblockId);
|
||||
if (!IsCurrentLifetime(generation, sequence))
|
||||
return false;
|
||||
|
||||
|
|
@ -737,7 +738,10 @@ internal sealed class LocalPlayerTeleportController
|
|||
if (_lifetimeGeneration != generation)
|
||||
return generation;
|
||||
|
||||
_worldReveal.Cancel();
|
||||
if (clearSession)
|
||||
_worldReveal.ResetSession();
|
||||
else
|
||||
_worldReveal.Cancel();
|
||||
if (_lifetimeGeneration != generation)
|
||||
return generation;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue