From c13bb2368edd1be7fadae8c55763d71ff8ecaaee Mon Sep 17 00:00:00 2001 From: soul Date: Wed, 21 Oct 2026 18:59:52 +0200 Subject: [PATCH] determinism-ledger: delete the clock-seeded item stream and the item-stream scatter ItemManager no longer seeds itself from DateTime.Now, and Zone's unpack no longer scatters ships with _itemManager.Random. Deletes before adds: this commit does not build (the scatter and every ItemManager seed return in the next commit). Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/ItemManager.cs | 2 +- Assets/Scripts/ServerShared/Zone.cs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index b33b17224..5c15d5e6d 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -17,7 +17,7 @@ using float4 = CultMath.float4; public class ItemManager { - public Random Random = new Random((uint) (DateTime.Now.Ticks%uint.MaxValue)); + public Random Random; private Action _logger; diff --git a/Assets/Scripts/ServerShared/Zone.cs b/Assets/Scripts/ServerShared/Zone.cs index dc8cd0538..a69fb9d41 100644 --- a/Assets/Scripts/ServerShared/Zone.cs +++ b/Assets/Scripts/ServerShared/Zone.cs @@ -271,9 +271,6 @@ public class Zone var entity = EntitySerializer.Unpack(_itemManager, this, entityPack); var ship = entity as Ship; Admit(entity, piloted: ship is {IsPlayerShip: false}); - // Generation placement, not admission: a ship packed at the origin is scattered across the zone. - if (ship is {IsPlayerShip: false} && lengthsq(ship.Position) < 1) - ship.Position = _itemManager.Random.NextFloat3(float3(-pack.Radius * .5f), float3(pack.Radius * .5f)); } // TODO: Associate planets with stored entities for planetary colonies