]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
round the pitchchange setting to the nearest value
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 28 Sep 2011 05:05:35 +0000 (05:05 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 1 Oct 2011 14:08:11 +0000 (16:08 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11375 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=56619d1466eae24fdfc16a47dfbdbb1dd15c36ee

sv_main.c

index 3f3a7895eab535d9a9cf47767a49b1b712ac98d9..b5cd29c377c4f29592925d364ff7bb3004d08d08 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -736,7 +736,7 @@ void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int v
 
        ent = PRVM_NUM_FOR_EDICT(entity);
 
-       speed4000 = (int)(speed * 4000.0f);
+       speed4000 = (int)floor(speed * 4000.0f + 0.5f);
        field_mask = 0;
        if (volume != DEFAULT_SOUND_PACKET_VOLUME)
                field_mask |= SND_VOLUME;