Made hashing faster in MapPolygonMesh::GetGeometryCRC()

This commit is contained in:
Robert Beckebans 2022-06-11 11:54:01 +02:00
parent f7db9d0ab7
commit 2d133b6910

View file

@ -2776,7 +2776,13 @@ unsigned int MapPolygonMesh::GetGeometryCRC() const
unsigned int crc = 0;
for( i = 0; i < verts.Num(); i++ )
{
#if 0
crc ^= StringCRC( ( verts[i].xyz * ( i + 1 ) ).ToString() );
#else
crc ^= FloatCRC( verts[i].xyz.x * ( i + 1 ) );
crc ^= FloatCRC( verts[i].xyz.y * ( i + 1 ) );
crc ^= FloatCRC( verts[i].xyz.z * ( i + 1 ) );
#endif
}
for( i = 0; i < polygons.Num(); i++ )