From: havoc Date: Tue, 25 Sep 2007 18:54:00 +0000 (+0000) Subject: use even bigger primes actually X-Git-Tag: xonotic-v0.1.0preview~2890 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1bf728531b454f544915a4042883065864ce89ed;p=xonotic%2Fdarkplaces.git use even bigger primes actually git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7587 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_shared.c b/model_shared.c index 16bc5022..3b381c58 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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);