]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Put our tools back in the shelf once our work is done. Also remove the now useless...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 268798a0c11fad9af8803a7360e0394876df267f..bb35b189cef495b052952417ac3ffc6ce76d2012 100644 (file)
@@ -80,7 +80,6 @@ void Vore_Swallow(entity e)
        e.alpha = -1; // best way of hiding / showing the eaten player\r
        e.aiment = e.eater; // follow the predator. Is automatically unset\r
        e.view_ofs_z /= 2; // best positioning for the stomach model\r
-       e.stat_eaten = num_for_edict(e.eater);\r
 \r
        // drop keys (KH) and flags (CTF) when we get swallowed\r
        kh_Key_DropAll(e, FALSE);\r
@@ -107,7 +106,6 @@ void Vore_Regurgitate(entity e)
                e.solid = e.vore_oldsolid;\r
        e.alpha = default_player_alpha; // best way of hiding / showing the eaten player\r
        e.view_ofs_z *= 2; // best positioning for the stomach model\r
-       e.stat_eaten = 0;\r
 \r
        // velocities\r
        local vector oldforward, oldright, oldup;\r
@@ -141,7 +139,6 @@ void Vore_Disconnect()
        if(self.eater.classname == "player")\r
        {\r
                self.view_ofs_z += 25;\r
-               self.stat_eaten = 0;\r
                self.eater.stomach_load -= 1;\r
                Vore_Weight_apply(self.eater);\r
                self.eater = world;\r
@@ -238,10 +235,16 @@ void Vore_Gurglesound()
 void Vore()\r
 {\r
        // if we are free, show our stomach load on the HUD. Otherwise, show the predator's\r
-       if(self.eater.classname == "player")\r
+       if(self.eater != self && self.eater.classname == "player")\r
+       {\r
                self.stat_stomachload = self.eater.stomach_load;\r
+               self.stat_eaten = num_for_edict(self.eater);\r
+       }\r
        else\r
+       {\r
                self.stat_stomachload = self.stomach_load;\r
+               self.stat_eaten = 0;\r
+       }\r
 \r
        // skip the vore system under some circumstances\r
        if(time < game_starttime)\r