From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Date: Sat, 9 Jul 2011 22:33:01 +0000 (+0300)
Subject: Correct positioning of the swallow model, and some more tweaks
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2eaf9e64a4b48b0bafa59e46ea3965249d3861e;p=voretournament%2Fvoretournament.git

Correct positioning of the swallow model, and some more tweaks
---

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