if the two mtimes are identical, also use the max interval as it's better to have...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 4 Oct 2011 07:42:50 +0000 (07:42 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 4 Oct 2011 07:42:50 +0000 (07:42 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11391 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 8f0ffed..88e43d9 100644 (file)
@@ -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);