]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix a weird bug
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 10 Jul 2011 19:35:01 +0000 (22:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 10 Jul 2011 19:35:01 +0000 (22:35 +0300)
data/qcsrc/server/vore.qc

index c9897f622ae68a40dd1c55c7326560bd90e5aeca..e209b317ba69a22fb2946d0e2d154ec8e58e3a65 100644 (file)
@@ -199,6 +199,7 @@ void Vore_AutoDigest(entity e)
        e.digesting = TRUE;\r
 }\r
 \r
+.entity swallow_model;\r
 void Vore_SwallowModel_Think()\r
 {\r
        //update the necessary angles to match our view\r
@@ -210,16 +211,14 @@ void Vore_SwallowModel_Think()
        // if our swallow progress is gone, the swallow model must also go\r
        if(!self.owner.swallow_progress_prey)\r
        {\r
-               self.nextthink = 0;\r
-               remove(self);\r
-               self = world;\r
+               remove(self.owner.swallow_model);\r
+               self.owner.swallow_model = world;\r
                return;\r
        }\r
 \r
        self.nextthink = time;\r
 }\r
 \r
-.entity swallow_model;\r
 void Vore_SwallowModel_Update(entity prey)\r
 {\r
        // if we don't have a swallow model already, spawn one\r