Fix ServerShared for CultMath

CultMath's hash(float2) returns float, not uint, so ZoneGenerator folds its
bits into the zone seed with BitConverter.SingleToInt32Bits. MathResolver's
int2?[] entry used ArrayFormatter<float2?>; it now uses ArrayFormatter<int2?>.

Aetheria.Shared and AetherDb build headless with 0 errors, and AetherDb's
census, factions and hardpoint-fit output is byte-identical to the captures
taken before the swap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-14 17:40:31 +02:00
commit 3dc00e1225
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ public static class ZoneGenerator
{
var pack = new ZonePack();
var random = new Random(unchecked((uint) galaxyZone.Name.GetHashCode()) ^ hash(galaxyZone.Position));
var random = new Random(unchecked((uint) galaxyZone.Name.GetHashCode()) ^ (uint) BitConverter.SingleToInt32Bits(hash(galaxyZone.Position)));
var density = saturate(galaxy.Background.CloudDensity(galaxyZone.Position)/2);
pack.Radius = zoneSettings.ZoneRadius.Evaluate(density);