Server 2.9.6: no old positions after reset / new game

Late position updates from players that are being reconnected after reset-world or a new game
were stored again, so everyone spawned at their old-world position. Tracking stops for those
clients now. Test added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 00:34:15 +02:00
co-authored by Claude Opus 5.5
parent e31953b4ab
commit 5e07fe1001
3 changed files with 18 additions and 2 deletions
+3
View File
@@ -746,6 +746,9 @@ public sealed class GameServer
int count = 0;
foreach (var c in clients.Values.Where(x => x.State == ClientState.Joined).ToList())
{
// Positionen/Bedürfnisse aus der alten Welt, die bis zum Trennen noch ankommen, nicht mehr speichern - sonst
// erscheint man nach Reset/neuem Spiel wieder dort, wo man in der alten Welt stand
c.TrackPositionFrom = DateTime.MaxValue;
c.Conn.Send(MsgType.Reconnect, Wire.Build(w => w.Write(message)));
c.Conn.CloseAfterSend("Reconnect after world change");
count++;