From 7d0e112313909fe2ea8ff744475d14b3bdba80ac Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 3 May 2011 03:34:08 +0300 Subject: [PATCH] Improve the swallowing complaint system. Also done for the change in the commit to follow. --- data/qcsrc/server/vore.qc | 48 +++++++++------------------------------ 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 6c7e0c2c..871b199a 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -38,52 +38,26 @@ float Swallow_condition_check(entity prey) if(!self.BUTTON_REGURGITATE && self.swallow_delay < time) if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_speedcap")) { + string swallow_complain; if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore")) + swallow_complain = "You cannot swallow your team mates\n"; + else if(!cvar("g_vore_spawnshield") && prey.spawnshieldtime > time) + swallow_complain = "You cannot swallow someone protected by the spawn shield\n"; + else if(self.stomach_load >= cvar("g_balance_vore_swallow_limit")) + swallow_complain = strcat("You cannot swallow more than ^2", cvar_string("g_balance_vore_swallow_limit"), "^7 players at a time\n"); + else if(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load) + swallow_complain = "You cannot swallow someone with a bigger stomach than yours\n"; + + if(swallow_complain != "") { if(time > self.complain_vore && self.BUTTON_ATCK) { play2(self, "misc/forbidden.wav"); - sprint(self, "You cannot swallow your team mates\n"); + sprint(self, swallow_complain); self.complain_vore = time + complain_delay_time; } return FALSE; } - - if(self.stomach_load >= cvar("g_balance_vore_swallow_limit")) - { - if(time > self.complain_vore && self.BUTTON_ATCK) - { - play2(self, "misc/forbidden.wav"); - sprint(self, strcat("You cannot swallow more than ^2", cvar_string("g_balance_vore_swallow_limit"), "^7 players at a time\n")); - self.complain_vore = time + complain_delay_time; - } - return FALSE; - } - - if(cvar("g_vore_biggergut")) - if(prey.stomach_load > self.stomach_load) - { - if(time > self.complain_vore && self.BUTTON_ATCK) - { - play2(self, "misc/forbidden.wav"); - sprint(self, "You cannot swallow someone with a bigger stomach than yours\n"); - self.complain_vore = time + complain_delay_time; - } - return FALSE; - } - - if(!cvar("g_vore_spawnshield")) - if(prey.spawnshieldtime > time) - { - if(time > self.complain_vore && self.BUTTON_ATCK) - { - play2(self, "misc/forbidden.wav"); - sprint(self, "You cannot swallow someone protected by the spawn shield\n"); - self.complain_vore = time + complain_delay_time; - } - return FALSE; - } - return TRUE; } return FALSE; -- 2.39.2