From 8d6097fcf3954193f086e1dc559b08c7e09a55c6 Mon Sep 17 00:00:00 2001 From: CAtlas0784 Date: Wed, 16 Sep 2026 18:34:59 +0700 Subject: [PATCH] feat(switching): retain previous character in world on switch for interaction and carry --- Ananta.Server/Ananta.Handlers/Game/GameRouter.Switching.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ananta.Server/Ananta.Handlers/Game/GameRouter.Switching.cs b/Ananta.Server/Ananta.Handlers/Game/GameRouter.Switching.cs index a9d9d0b..7ae96e6 100644 --- a/Ananta.Server/Ananta.Handlers/Game/GameRouter.Switching.cs +++ b/Ananta.Server/Ananta.Handlers/Game/GameRouter.Switching.cs @@ -111,8 +111,9 @@ internal sealed partial class GameRouter await PublishSafeRuntimeBuffSnapshot4229938(ctx, unitId, templateId, "minimal-direct-switch"); state.AllBuildBuffsPublished = true; - if (oldUnitId != 0 && oldUnitId != unitId) - await ctx.NotifyAsync(MethodId.SyncLogicAgentLeave, WorldCodec.LogicAgentLeave(oldUnitId)); + // Keep the previous character in the world scene so the player can interact with / carry them + // if (oldUnitId != 0 && oldUnitId != unitId) + // await ctx.NotifyAsync(MethodId.SyncLogicAgentLeave, WorldCodec.LogicAgentLeave(oldUnitId)); await ctx.NotifyAsync(MethodId.SyncGamePause, WorldCodec.GamePause(false)); state.SwitchCount++;