From 3e05173d112d5d3442ef6178b945732775293b53 Mon Sep 17 00:00:00 2001 From: Eugene Pogrebnyak Date: Thu, 3 Dec 2020 23:47:39 +0300 Subject: [PATCH] Fixed hash generation to 100% fit RAGE one --- CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 4530878..be16759 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -1516,9 +1516,9 @@ namespace CodeWalker.GameFiles public void UpdateEntityHash() { - uint xhash = (uint)Math.Floor(Position.X * 100); - uint yhash = (uint)Math.Floor(Position.Y * 100); - uint zhash = (uint)Math.Floor(Position.Z * 100); + uint xhash = (uint)(Position.X * 100); + uint yhash = (uint)(Position.Y * 100); + uint zhash = (uint)(Position.Z * 100); EntityHash = _CEntityDef.archetypeName.Hash ^ xhash ^ yhash ^ zhash & 0xffffffff; }