]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Don't allow players to swallow anyone larger than them by default. This means you...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 6c7e0c2c2cdca8c435fc00b224a23876a43e86e5..4adbd900e443396e1710e16780f118823e24f78d 100644 (file)
@@ -38,52 +38,28 @@ float Swallow_condition_check(entity prey)
        if(!self.BUTTON_REGURGITATE && self.swallow_delay < time)\r
        if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_speedcap"))\r
        {\r
+               string swallow_complain;\r
                if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore"))\r
+                       swallow_complain = "You cannot swallow your team mates\n";\r
+               else if(!cvar("g_vore_spawnshield") && prey.spawnshieldtime > time)\r
+                       swallow_complain = "You cannot swallow someone protected by the spawn shield\n";\r
+               else if(self.stomach_load >= cvar("g_balance_vore_swallow_limit"))\r
+                       swallow_complain = strcat("You cannot swallow more than ^2", cvar_string("g_balance_vore_swallow_limit"), "^7 players at a time\n");\r
+               else if(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load)\r
+                       swallow_complain = "You cannot swallow someone with a bigger stomach than yours\n";\r
+               else if(cvar("g_vore_biggersize") && prey.scale > self.scale)\r
+                       swallow_complain = "You cannot swallow someone larger than you\n";\r
+\r
+               if(swallow_complain != "")\r
                {\r
                        if(time > self.complain_vore && self.BUTTON_ATCK)\r
                        {\r
                                play2(self, "misc/forbidden.wav");\r
-                               sprint(self, "You cannot swallow your team mates\n");\r
+                               sprint(self, swallow_complain);\r
                                self.complain_vore = time + complain_delay_time;\r
                        }\r
                        return FALSE;\r
                }\r
-\r
-               if(self.stomach_load >= cvar("g_balance_vore_swallow_limit"))\r
-               {\r
-                       if(time > self.complain_vore && self.BUTTON_ATCK)\r
-                       {\r
-                               play2(self, "misc/forbidden.wav");\r
-                               sprint(self, strcat("You cannot swallow more than ^2", cvar_string("g_balance_vore_swallow_limit"), "^7 players at a time\n"));\r
-                               self.complain_vore = time + complain_delay_time;\r
-                       }\r
-                       return FALSE;\r
-               }\r
-\r
-               if(cvar("g_vore_biggergut"))\r
-               if(prey.stomach_load > self.stomach_load)\r
-               {\r
-                       if(time > self.complain_vore && self.BUTTON_ATCK)\r
-                       {\r
-                               play2(self, "misc/forbidden.wav");\r
-                               sprint(self, "You cannot swallow someone with a bigger stomach than yours\n");\r
-                               self.complain_vore = time + complain_delay_time;\r
-                       }\r
-                       return FALSE;\r
-               }\r
-\r
-               if(!cvar("g_vore_spawnshield"))\r
-               if(prey.spawnshieldtime > time)\r
-               {\r
-                       if(time > self.complain_vore && self.BUTTON_ATCK)\r
-                       {\r
-                               play2(self, "misc/forbidden.wav");\r
-                               sprint(self, "You cannot swallow someone protected by the spawn shield\n");\r
-                               self.complain_vore = time + complain_delay_time;\r
-                       }\r
-                       return FALSE;\r
-               }\r
-\r
                return TRUE;\r
        }\r
        return FALSE;\r