Development Merge 2025.10.18 #4

Merged
Syntriax merged 91 commits from development into main 2025-10-18 10:03:13 +02:00
Showing only changes of commit 8e314f3269 - Show all commits

View File

@@ -0,0 +1,27 @@
namespace Engine.Systems.Network;
public static class TypeHasher<T>
{
private static long _fnv1a = 0;
public static long FNV1a
{
get
{
if (_fnv1a == 0)
unchecked
{
const long fnvPrime = 1099511628211;
_fnv1a = 1469598103934665603;
string typeName = typeof(T).FullName ?? typeof(T).Name;
foreach (char c in typeName)
{
_fnv1a ^= c;
_fnv1a *= fnvPrime;
}
}
return _fnv1a;
}
}
}