Fix a big issue with my probability deadprey check
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 19 Apr 2011 16:22:20 +0000 (19:22 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 19 Apr 2011 16:22:20 +0000 (19:22 +0300)
data/qcsrc/server/vore.qc

index 8566f1508c0b7934a5925cb5471052753a10345c..9e6a5f945b1c727aedebccf438cc5245a63d5573 100644 (file)
@@ -317,20 +317,21 @@ void Vore_DeadPrey_Detach(entity e)
 \r
 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.deadflag != DEAD_NO && random() < cvar("g_vore_keepdeadprey"))\r
+       if(pred_disconnect)\r
        {\r
-               // if keepdeadprey is enabled and the predator disconnected, detach the dead prey\r
-               if(pred_disconnect)\r
-               {\r
-                       if(e.fakeprey)\r
-                               Vore_DeadPrey_Detach(e);\r
-               }\r
+               if(e.fakeprey)\r
+                       Vore_DeadPrey_Detach(e);\r
                else\r
-                       Vore_DeadPrey_Configure(e);\r
+                       Vore_Regurgitate(e);\r
        }\r
        else\r
-               Vore_Regurgitate(e);\r
+       {\r
+               // if the keepdeadprey feature is on, don't spit a dead prey's carcass out\r
+               if(e.deadflag != DEAD_NO && random() < cvar("g_vore_keepdeadprey"))\r
+                       Vore_DeadPrey_Configure(e);\r
+               else\r
+                       Vore_Regurgitate(e);\r
+       }\r
 }\r
 \r
 void Vore_Disconnect()\r