From: divverent Date: Tue, 4 Oct 2011 07:42:50 +0000 (+0000) Subject: if the two mtimes are identical, also use the max interval as it's better to have... X-Git-Tag: xonotic-v0.6.0~287 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c83c81175c2b2187a0e6656080ccf4f60c812cea;p=xonotic%2Fdarkplaces.git if the two mtimes are identical, also use the max interval as it's better to have this randomization than to have none git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11391 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=bdbc7672b5ef00f204f341c95a601f5e71e9e8e0 --- diff --git a/snd_main.c b/snd_main.c index 8f0ffede..88e43d94 100644 --- a/snd_main.c +++ b/snd_main.c @@ -1689,7 +1689,7 @@ int S_StartSound_StartPosition_Flags (int entnum, int entchannel, sfx_t *sfx, ve float maxtics = snd_identicalsoundrandomization_tics.value; float maxticsdelta = ((cls.state == ca_connected) ? (maxtics * (cl.mtime[0] - cl.mtime[1])) : 0); float maxdelta = 0; - if(maxtics == 0 || fabs(maxticsdelta) > fabs(maxtime)) + if(maxticsdelta == 0 || fabs(maxticsdelta) > fabs(maxtime)) maxdelta = maxtime; else maxdelta = fabs(maxticsdelta) * ((maxtime > 0) ? 1 : -1);