]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
use even bigger primes actually
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Sep 2007 18:54:00 +0000 (18:54 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Sep 2007 18:54:00 +0000 (18:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7587 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index 16bc502213594afeb63e59392ffec16dfcf708b5..3b381c58a903eaec14f8e87d74dd73a41ca92a99 100644 (file)
@@ -818,7 +818,7 @@ int Mod_ShadowMesh_AddVertex(shadowmesh_t *mesh, float *vertex14f)
        int hashindex, vnum;
        shadowmeshvertexhash_t *hash;
        // this uses prime numbers intentionally
-       hashindex = (unsigned int) (vertex14f[0] * 29 + vertex14f[1] * 71 + vertex14f[2] * 113) % SHADOWMESHVERTEXHASH;
+       hashindex = (unsigned int) (vertex14f[0] * 2003 + vertex14f[1] * 4001 + vertex14f[2] * 7919) % SHADOWMESHVERTEXHASH;
        for (hash = mesh->vertexhashtable[hashindex];hash;hash = hash->next)
        {
                vnum = (hash - mesh->vertexhashentries);