Some fixes I forgot to self.deadflag in the vore code
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 17 Apr 2011 21:56:14 +0000 (00:56 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 17 Apr 2011 21:56:14 +0000 (00:56 +0300)
data/qcsrc/server/vore.qc

index c09667815ee55b5c2210c1198aed11aaa0fcc000..ac8d5b48d04d7687794a79cc62ba98436fd8ab7b 100644 (file)
@@ -306,7 +306,7 @@ void Vore_DeadPrey_Detach(entity e)
 void Vore_PreyRelease(entity e, float pred_disconnect)\r
 {\r
        // if the keepdeadprey feature is on, don't spit a dead prey's carcass out\r
-       if(e.health <= 0 && cvar("g_vore_keepdeadprey"))\r
+       if(e.deadflag != DEAD_NO && cvar("g_vore_keepdeadprey"))\r
        {\r
                // if keepdeadprey is enabled and the predator disconnected, detach the dead prey\r
                if(pred_disconnect)\r
@@ -360,7 +360,7 @@ void Vore_Digest()
                self.predator.digestion_step = time + steptime;\r
        }\r
 \r
-       if(self.health <= 0)\r
+       if(self.deadflag != DEAD_NO)\r
        if(stov(cvar_string("g_vore_regurgitatecolor_digest")))\r
                self.colormod = stov(cvar_string("g_vore_regurgitatecolor_digest"));\r
 }\r
@@ -616,13 +616,13 @@ void Vore()
        if(self.predator.classname != "player")\r
                return;\r
 \r
-       if(self.deadflag)\r
+       if(self.deadflag != DEAD_NO)\r
        {\r
                Vore_PreyRelease(self, FALSE);\r
                return;\r
        }\r
 \r
-       if(self.predator.deadflag)\r
+       if(self.predator.deadflag != DEAD_NO)\r
                Vore_Regurgitate(self);\r
        else if(vlen(self.predator.velocity) > cvar("g_balance_vore_regurgitate_speedcap"))\r
                Vore_Regurgitate(self);\r