]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Don't allow players with spawn shields active to be swallowed
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 6fa15248e59653384e05721116a88a844aef78a6..2bf9291993194a24605bc3e75645c11514f97b4d 100644 (file)
@@ -67,6 +67,18 @@ float Swallow_condition_check(entity prey)
                        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