From: divverent Date: Mon, 2 Mar 2015 21:25:57 +0000 (+0000) Subject: Just in case, make collision cache sequence numbers unsigned too. X-Git-Tag: xonotic-v0.8.1~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=221e60beca2c221187939348d0f51b05fb80ec0f;p=xonotic%2Fdarkplaces.git Just in case, make collision cache sequence numbers unsigned too. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12174 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=c3f319134f8a778eeac64d47e2190c034f3d80de --- diff --git a/collision.c b/collision.c index 2c4cec65..f440042c 100644 --- a/collision.c +++ b/collision.c @@ -1422,7 +1422,7 @@ static collision_cachedtrace_t *collision_cachedtrace_array; static int collision_cachedtrace_firstfree; static int collision_cachedtrace_lastused; static int collision_cachedtrace_max; -static int collision_cachedtrace_sequence; +static unsigned char collision_cachedtrace_sequence; static int collision_cachedtrace_hashsize; static int *collision_cachedtrace_hash; static unsigned int *collision_cachedtrace_arrayfullhashindex; @@ -1470,7 +1470,7 @@ static void Collision_Cache_RebuildHash(void) { int index; int range = collision_cachedtrace_lastused + 1; - int sequence = collision_cachedtrace_sequence; + unsigned char sequence = collision_cachedtrace_sequence; int firstfree = collision_cachedtrace_max; int lastused = 0; int *hash = collision_cachedtrace_hash; @@ -1540,7 +1540,7 @@ static collision_cachedtrace_t *Collision_Cache_Lookup(dp_model_t *model, const unsigned int fullhashindex; int index = 0; int range; - int sequence = collision_cachedtrace_sequence; + unsigned char sequence = collision_cachedtrace_sequence; int *hash = collision_cachedtrace_hash; unsigned int *arrayfullhashindex = collision_cachedtrace_arrayfullhashindex; unsigned int *arraynext = collision_cachedtrace_arraynext;