From: havoc Date: Wed, 28 Sep 2011 05:05:35 +0000 (+0000) Subject: round the pitchchange setting to the nearest value X-Git-Tag: xonotic-v0.6.0~163^2~177 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56619d1466eae24fdfc16a47dfbdbb1dd15c36ee;p=xonotic%2Fdarkplaces.git round the pitchchange setting to the nearest value git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11375 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index 0e3d89be..6d2c9d18 100644 --- 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;