Write copybody code in a better way
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 27 Feb 2011 17:54:44 +0000 (19:54 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 27 Feb 2011 17:54:44 +0000 (19:54 +0200)
data/qcsrc/server/cl_player.qc

index 3a89ad4..af48331 100644 (file)
@@ -103,12 +103,10 @@ void WeaponStats_LogKill(float awep, float vwep)
 \r
 void CopyBody(float keepvelocity)\r
 {\r
-       // don't copybody for players inside the stomach\r
-       if(self.fakepredator.classname == "player")\r
-               return;\r
-\r
        local entity oldself;\r
-       if (self.effects & EF_NODRAW)\r
+       if (self.fakepredator.classname == "player")\r
+               return;\r
+       if (self.effects & EF_NODRAW || self.alpha < 0)\r
                return;\r
        oldself = self;\r
        self = spawn();\r