]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Don't cut prey sound volume when that prey is either yourself, either someone in...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 11:17:44 +0000 (13:17 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 11:17:44 +0000 (13:17 +0200)
data/qcsrc/server/cl_player.qc
docs/TODO.txt

index 14a35473f9fadbb6fa7c81a960f4febdabb914f7..e7bfb2d488a6d177fb1ba5452879d08bc66d2a72 100644 (file)
@@ -1225,7 +1225,7 @@ void GlobalSound(string sample, float chan, float voicetype)
 {\r
        float n;\r
        float tauntrand;\r
-       float vol;\r
+       float vol, vol_apply;\r
 \r
        if(sample == "")\r
                return;\r
@@ -1255,7 +1255,10 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        if(clienttype(msg_entity) == CLIENTTYPE_REAL)\r
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                                       soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
+                                               {\r
+                                                       vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                                                       soundto(MSG_ONE, self, chan, sample, vol_apply, ATTN_MIN);\r
+                                               }\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                        }\r
@@ -1269,7 +1272,10 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        if(clienttype(msg_entity) == CLIENTTYPE_REAL)\r
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                                       soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
+                                               {\r
+                                                       vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                                                       soundto(MSG_ONE, self, chan, sample, vol_apply, ATTN_MIN);\r
+                                               }\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                        }\r
@@ -1283,7 +1289,10 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if(!teams_matter || msg_entity.team == self.team)\r
                                {\r
                                        if(msg_entity.cvar_cl_voice_directional == 1)\r
-                                               soundto(MSG_ONE, self, chan, sample, vol, ATTN_MIN);\r
+                                       {\r
+                                               vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                                               soundto(MSG_ONE, self, chan, sample, vol_apply, ATTN_MIN);\r
+                                       }\r
                                        else\r
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                }\r
@@ -1300,7 +1309,10 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if (tauntrand < msg_entity.cvar_cl_autotaunt)\r
                                {\r
                                        if (msg_entity.cvar_cl_voice_directional >= 1)\r
-                                               soundto(MSG_ONE, self, chan, sample, vol, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+                                       {\r
+                                               vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                                               soundto(MSG_ONE, self, chan, sample, vol_apply, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+                                       }\r
                                        else\r
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                                }\r
@@ -1316,12 +1328,19 @@ void GlobalSound(string sample, float chan, float voicetype)
                        FOR_EACH_REALCLIENT(msg_entity)\r
                        {\r
                                if (msg_entity.cvar_cl_voice_directional >= 1)\r
-                                       soundto(MSG_ONE, self, chan, sample, vol, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+                               {\r
+                                       vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                                       soundto(MSG_ONE, self, chan, sample, vol_apply, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
+                               }\r
                                else\r
                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                        }\r
                case VOICETYPE_PLAYERSOUND:\r
-                               sound(self, chan, sample, vol, ATTN_NORM);\r
+                       FOR_EACH_REALCLIENT(msg_entity)\r
+                       {\r
+                               vol_apply = (self.predator != msg_entity.predator && self != msg_entity) ? vol : VOL_BASEVOICE;\r
+                               soundto(MSG_ONE, self, chan, sample, vol_apply, ATTN_NORM);\r
+                       }\r
                        break;\r
                case VOICETYPE_GURGLE:\r
                        if(self.stomach_load)\r
index e053376347b665b34e6b40f97153ea0c523e29e7..8a7a067bfc60c7d1544bf10cfc14d17b299dbf06 100644 (file)
 \r
 - 0.7 BUG: Fix the following crash, apparently taking place after the tutorial map: http://pastebin.com/hz9md090\r
 \r
-- 0.7: When a player sound has less volume because the player is in a belly, make sure that doesn't apply to neighboring prey, because they are there too\r
+- 0.7: I set a different horizontal and vertical view bobbing, but the menu sliders adjust both to the same value. Fix this somehow\r
 \r
-- 0.7: I set a different horizontal and vertical view bobbing, but the menu sliders adjust both to the same value. Fix this somehow
\ No newline at end of file
+- 0.7 BUG: Death chase camera activates when you're in a belly
\ No newline at end of file