]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Don't start digestion if we already ate someone, as that means we manually disabled...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index b4a2126eb58548a3760ffc540183119f98da9266..863f8b61c1f9d1775b5ad76d8e5626c2ee4f24df 100644 (file)
@@ -144,10 +144,12 @@ void Vore_AutoDigest(entity e)
 {\r
        // if the predator has the autodigest preference enabled, begin digesting new prey automatically\r
 \r
-       if not(e.cvar_cl_vore_autodigest)\r
-               return;\r
-       if not(cvar("g_vore_digestion"))\r
+       if(!cvar("g_vore_digestion") || e.digesting)\r
                return;\r
+       if(!e.cvar_cl_vore_autodigest || clienttype(e) != CLIENTTYPE_REAL)\r
+               return; // this feature is only for players, not bots\r
+       if(e.stomach_load > 1)\r
+               return; // don't start digestion if we already ate someone, as that means we manually disabled it after the first prey and want it off\r
 \r
        entity head;\r
        if(teams_matter)\r
@@ -155,7 +157,7 @@ void Vore_AutoDigest(entity e)
                FOR_EACH_PLAYER(head)\r
                {\r
                        // never begin automatic digestion if we've swallowed a team mate\r
-                       if(head.team == e.team)\r
+                       if(head.predator == e && head.team == e.team)\r
                                return;\r
                }\r
        }\r