]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 7 Oct 2011 21:05:55 +0000 (23:05 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11391 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=bdbc7672b5ef00f204f341c95a601f5e71e9e8e0

snd_main.c

index 8f0ffedeea56a0c239bb9ca7a24639b3ef6b5db5..88e43d949a5a634d9a3fa722a564941204293112 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);