From: MirceaKitsune Date: Sun, 27 Feb 2011 21:13:12 +0000 (+0200) Subject: Don't start digestion if we already ate someone, as that means we manually disabled... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=36005b649b9a75affa4ac71f293106350320ca36 Don't start digestion if we already ate someone, as that means we manually disabled it after the first prey and want it off. Also do some code optimizations --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index b3fd18fd..863f8b61 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -144,12 +144,12 @@ void Vore_AutoDigest(entity e) { // if the predator has the autodigest preference enabled, begin digesting new prey automatically - if not(cvar("g_vore_digestion")) + if(!cvar("g_vore_digestion") || e.digesting) return; - if not(e.cvar_cl_vore_autodigest) - return; - if(clienttype(e) != CLIENTTYPE_REAL) - return; // this feature is only for players + if(!e.cvar_cl_vore_autodigest || clienttype(e) != CLIENTTYPE_REAL) + return; // this feature is only for players, not bots + if(e.stomach_load > 1) + 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 entity head; if(teams_matter)