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:
parent
6140a06a0a
commit
3dc00e1225
2 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ internal static class MathResolverResolverGetFormatterHelper
|
|||
{ typeof(float3[]), new ArrayFormatter<float3>() },
|
||||
{ typeof(float4[]), new ArrayFormatter<float4>() },
|
||||
{ typeof(float2?[]), new ArrayFormatter<float2?>() },
|
||||
{ typeof(int2?[]), new ArrayFormatter<float2?>() },
|
||||
{ typeof(int2?[]), new ArrayFormatter<int2?>() },
|
||||
{ typeof(float3?[]), new ArrayFormatter<float3?>() },
|
||||
{ typeof(float4?[]), new ArrayFormatter<float4?>() },
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue