]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Correct positioning of the swallow model, and some more tweaks
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 22:33:01 +0000 (01:33 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 22:33:01 +0000 (01:33 +0300)
data/models/player/vixen_swallow.md3
data/qcsrc/server/vore.qc

index c7f3a9764b2d34a2c39be15f72f34c326d6e52ac..7237893908bd55823cc2697c46eb6cad6c31793b 100644 (file)
Binary files a/data/models/player/vixen_swallow.md3 and b/data/models/player/vixen_swallow.md3 differ
index 5e2abefa827cfa5ee1aeb8c9aa09fe41d6d97d21..e289809838accf5d41a7504e9fbf3f44bf7a468a 100644 (file)
@@ -203,15 +203,16 @@ void Vore_SwallowModel_Think()
 {\r
        //update the necessary angles to match our view\r
        self.angles_x = self.owner.angles_x;\r
 {\r
        //update the necessary angles to match our view\r
        self.angles_x = self.owner.angles_x;\r
+       self.view_ofs = self.owner.view_ofs;\r
 \r
        // if our swallow progress is gone, the swallow model must also go\r
 \r
        // if our swallow progress is gone, the swallow model must also go\r
-       if(!self.owner.swallow_progress_prey)\r
+       /*if(!self.owner.swallow_progress_prey)\r
        {\r
                self.nextthink = 0;\r
                remove(self);\r
                self = world;\r
                return;\r
        {\r
                self.nextthink = 0;\r
                remove(self);\r
                self = world;\r
                return;\r
-       }\r
+       }*/\r
 \r
        self.nextthink = time;\r
 }\r
 \r
        self.nextthink = time;\r
 }\r
@@ -234,7 +235,6 @@ void Vore_SwallowModel_Spawn(entity prey)
        // apply the properties of the prey\r
        e.angles_x = prey.angles_x;\r
        e.aiment = prey;\r
        // apply the properties of the prey\r
        e.angles_x = prey.angles_x;\r
        e.aiment = prey;\r
-       e.origin += prey.view_ofs;\r
 \r
        e.owner = prey; // owned by the prey\r
        e.enemy = self; // enemy is the predator\r
 \r
        e.owner = prey; // owned by the prey\r
        e.enemy = self; // enemy is the predator\r
@@ -299,14 +299,14 @@ void Vore_SwallowStep(entity e)
        }\r
 \r
        // if the predator swallowing me has changed, remove the swallow model\r
        }\r
 \r
        // if the predator swallowing me has changed, remove the swallow model\r
-       if(e.swallow_model && e.swallow_model.enemy != self)\r
+       if(e.swallow_model != world && e.swallow_model.enemy != self)\r
        {\r
                e.swallow_model.nextthink = 0;\r
                remove(e.swallow_model);\r
                e.swallow_model = world;\r
        }\r
        //set the swallow model for the prey\r
        {\r
                e.swallow_model.nextthink = 0;\r
                remove(e.swallow_model);\r
                e.swallow_model = world;\r
        }\r
        //set the swallow model for the prey\r
-       if(!e.swallow_model)\r
+       if(e.swallow_model == world)\r
                Vore_SwallowModel_Spawn(e);\r
 \r
        // increase the progress value until it reaches 1, then swallow the player\r
                Vore_SwallowModel_Spawn(e);\r
 \r
        // increase the progress value until it reaches 1, then swallow the player\r