]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_player.qc
Simplify fall damage sound, as done in Xonotic
[voretournament/voretournament.git] / data / qcsrc / server / cl_player.qc
index a12a43bdab5451d4f13468375f89906da315c64e..932d0b96058e6b9daef3a21bec571518a8ed82aa 100644 (file)
@@ -486,14 +486,17 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                                        }\r
 \r
                                        if(sound_allowed(MSG_BROADCAST, attacker))\r
+                                       if(self.health > 1)\r
                                        {\r
-                                               if(self.health > 75) // TODO make a "gentle" version?\r
+                                               if(deathtype == DEATH_FALL)\r
+                                                       PlayerSound(self, playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
+                                               else if(self.health > 75) // TODO make a "gentle" version?\r
                                                        PlayerSound(self, playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
                                                else if(self.health > 50)\r
                                                        PlayerSound(self, playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
                                                else if(self.health > 25)\r
                                                        PlayerSound(self, playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
-                                               else if(self.health > 1)\r
+                                               else\r
                                                        PlayerSound(self, playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
                                        }\r
                                }\r
@@ -746,11 +749,11 @@ void UpdateSelectedPlayer()
        selected = world;\r
        selected_score = 0.95; // 18 degrees\r
 \r
-       if(self.eater.classname == "player")\r
+       if(self.predator.classname == "player")\r
        {\r
                if(!self.dropweapon_check)\r
-               if(self.eater.team != self.team) // don't disarm team mates when swallowing them\r
-               if(random() < cvar("g_vore_dropweapon"))\r
+               if(self.predator.team != self.team) // don't disarm team mates when swallowing them\r
+               if(random() < cvar("g_balance_vore_swallow_dropweapon"))\r
                        SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);\r
                self.dropweapon_check = TRUE;\r
        }\r
@@ -1230,7 +1233,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
                                                {\r
-                                                       if(self.eater.classname == "player")\r
+                                                       if(self.predator.classname == "player")\r
                                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
                                                        else\r
                                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
@@ -1249,7 +1252,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        {\r
                                                if(msg_entity.cvar_cl_voice_directional == 1)\r
                                                {\r
-                                                       if(self.eater.classname == "player")\r
+                                                       if(self.predator.classname == "player")\r
                                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
                                                        else\r
                                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
@@ -1268,7 +1271,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                {\r
                                        if(msg_entity.cvar_cl_voice_directional == 1)\r
                                        {\r
-                                               if(self.eater.classname == "player")\r
+                                               if(self.predator.classname == "player")\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN);\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);\r
@@ -1290,7 +1293,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                {\r
                                        if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                        {\r
-                                               if(self.eater.classname == "player")\r
+                                               if(self.predator.classname == "player")\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
                                                else\r
                                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
@@ -1311,7 +1314,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                        {\r
                                if (msg_entity.cvar_cl_voice_directional >= 1)\r
                                {\r
-                                       if(self.eater.classname == "player")\r
+                                       if(self.predator.classname == "player")\r
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
                                        else\r
                                                soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));\r
@@ -1320,7 +1323,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                                        soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);\r
                        }\r
                case VOICETYPE_PLAYERSOUND:\r
-                       if(self.eater.classname == "player")\r
+                       if(self.predator.classname == "player")\r
                                sound(self, chan, sample, VOL_BASE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_NORM);\r
                        else\r
                                sound(self, chan, sample, VOL_BASE, ATTN_NORM);\r