]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
If the prey has been fully digested, silently detach them
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 20:51:15 +0000 (23:51 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 2 Aug 2011 20:51:15 +0000 (23:51 +0300)
data/qcsrc/server/vore.qc

index a32ec8e16a3ed38f79ff39c38e78ff6496089a76..cd795cec975f5bc26c60bf3ce85cff861fb8a5b7 100644 (file)
@@ -360,6 +360,14 @@ void Vore_Regurgitate(entity e)
                e.solid = e.vore_oldsolid;\r
        e.view_ofs_z = PL_VIEW_OFS_z;\r
 \r
+       // if the prey has been fully digested, silently detach them\r
+       if(e.deadflag != DEAD_NO && e.health <= cvar("g_balance_vore_digestion_limit"))\r
+       {\r
+               e.predator = world;\r
+               e.modelindex = 0; // hide the dead body\r
+               return;\r
+       }\r
+\r
        // apply velocities\r
        local vector oldforward, oldright, oldup;\r
        oldforward = v_forward;\r