X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fsounds%2Fsound.qh;h=45cd41f15e1041e28acdfe95d0265749db116b7f;hp=036c0867013124ede9dce8ccbcc677dd9fa69271;hb=cab88c9722dd8c504eb5d797d80c3e524ebfa08b;hpb=3cfa3eaf6856fe76f7fd8c945fbfab2e9e28014c diff --git a/qcsrc/common/sounds/sound.qh b/qcsrc/common/sounds/sound.qh index 036c086701..45cd41f15e 100644 --- a/qcsrc/common/sounds/sound.qh +++ b/qcsrc/common/sounds/sound.qh @@ -22,10 +22,11 @@ const int CH_PLAYER_SINGLE = 7; // const int CH_BGM_SINGLE = -8; const int CH_BGM_SINGLE = 8; const int CH_AMBIENT = -9; -// const int CH_AMBIENT_SINGLE = 9; +const int CH_AMBIENT_SINGLE = 9; const float ATTEN_NONE = 0; const float ATTEN_MIN = 0.015625; +const float ATTEN_LOW = 0.2; const float ATTEN_NORM = 0.5; const float ATTEN_LARGE = 1; const float ATTEN_IDLE = 2; @@ -41,11 +42,10 @@ const float VOL_MUFFLED = 0.35; #ifdef SVQC #define _sound(e, c, s, v, a) \ MACRO_BEGIN \ - { \ entity __e = e; \ if (sound_allowed(MSG_BROADCAST, __e)) \ sound7(__e, c, s, v, a, 0, 0); \ - } MACRO_END + MACRO_END #else #define _sound(e, c, s, v, a) sound7(e, c, s, v, a, 0, 0) #endif @@ -65,7 +65,6 @@ const float VOL_MUFFLED = 0.35; */ #define sound8(e, o, chan, samp, vol, atten, speed, sf) \ MACRO_BEGIN \ - { \ entity __e; \ int __chan = chan; \ string __samp = samp; \ @@ -90,7 +89,7 @@ const float VOL_MUFFLED = 0.35; setorigin(__e, old_origin); \ setsize(__e, old_mins, old_maxs); \ } \ - } MACRO_END + MACRO_END string _Sound_fixpath(string base) { @@ -128,10 +127,10 @@ CLASS(Sound, Object) } METHOD(Sound, sound_precache, void(Sound this)) { - TC(Sound, this); + TC(Sound, this); string s = _Sound_fixpath(this.sound_str()); if (!s) return; - profile(sprintf("precache_sound(\"%s\")", s)); + //profile(sprintf("precache_sound(\"%s\")", s)); precache_sound(s); strcpy(this.sound_str_, s); }