about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-08-05 08:59:38 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-08-05 08:59:38 +0000
commit421300ffb893ff406f9334482d9867d38ec67c00 (patch)
treedfc07c9971d0f1322979455fbcca33066ea5b7ad /src/engine/client
parentc1509e5cd4ca1efcc1b737d8759059c1724f4ecf (diff)
downloadzcatch-421300ffb893ff406f9334482d9867d38ec67c00.tar.gz
zcatch-421300ffb893ff406f9334482d9867d38ec67c00.zip
many small changes everywhere
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/snd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/client/snd.cpp b/src/engine/client/snd.cpp
index 0ba18e89..2b01fc84 100644
--- a/src/engine/client/snd.cpp
+++ b/src/engine/client/snd.cpp
@@ -14,7 +14,7 @@ static const float NUM_FRAMES_LERP_INV = 1.0f/(float)NUM_FRAMES_LERP;
 static const float GLOBAL_VOLUME_SCALE = 0.75f;
 static float master_volume = 1.0f;
 
-static const int64 GLOBAL_SOUND_DELAY = 1000;
+static const float GLOBAL_SOUND_DELAY = 0.05f;
 
 // --- sound ---
 class sound_data
@@ -156,7 +156,7 @@ public:
 	
 	int play(sound_data *sound, unsigned loop, float vol, float pan)
 	{
-		if(time_get() - sound->last_played < GLOBAL_SOUND_DELAY)
+		if(time_get() - sound->last_played < (int64)(time_freq()*GLOBAL_SOUND_DELAY))
 			return -1;
 
 		for(int c = 0; c < MAX_CHANNELS; c++)