--- deliantra/server/socket/sounds.C 2007/07/28 00:45:05 1.18 +++ deliantra/server/socket/sounds.C 2007/07/31 01:06:20 1.19 @@ -95,10 +95,10 @@ send_face (sound); flush_fx (); - sint8 vol = idistance (dx, dy) * -80 / 10; + uint8 vol = clamp (255 - idistance (dx, dy) * 255 / 10, 0, 255); // cut off volume here - if (vol < -80) + if (vol < 16) return; packet sl ("sc"); @@ -110,7 +110,7 @@ << ber32 (sound) << sint8 (dx) << sint8 (dy) - << sint8 (vol); // -128 == silent, 0 normal, 127 twice the amplitude + << uint8 (vol); // 0 == silent, 255 max *len = sl.cur - len; // patch in group length