From bdbc7672b5ef00f204f341c95a601f5e71e9e8e0 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 4 Oct 2011 07:42:50 +0000 Subject: [PATCH] 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 --- snd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2