feat(switching): retain previous character in world on switch for interaction and carry
This commit is contained in:
1 parent
2aa434b1e9
commit
8d6097fcf3
1 file changed
+3
-2
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user