From 38675a342a8c23b36edeb321b714140a9d586658 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 4 May 2011 01:19:41 +0300 Subject: [PATCH] Positions for all 9 occupants --- data/qcsrc/server/vore.qc | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 9a6f1b3c..e0abddd9 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -98,9 +98,6 @@ float Vore_CanLeave() // position the camera properly for prey void Vore_SetCamera() { - /*if not(self.stat_eaten) - return;*/ - local entity head; local vector oldforward, oldright, oldup; local float position_counter; @@ -112,6 +109,10 @@ void Vore_SetCamera() makevectors(self.v_angle); v_forward_z = 0; + // In order to allow prey to see each other in the same stomach, we must position each occupant differently, + // else all players would overlap in the center. To do this, we run a loop on all players in the same stomach. + // For each player, the origin is updated, then a new origin is used for the next player and so on. + // This requires that no more than 9 players can be in a stomach at a time! FOR_EACH_PLAYER(head) { if(head.predator == self) @@ -119,9 +120,31 @@ void Vore_SetCamera() switch(position_counter) { case 0: + origin_apply = '0 0 0'; // first occupant sits in the middle break; case 1: - origin_apply = '1 0 0'; + origin_apply = '1 0 0'; // second occupant sits in the front + break; + case 2: + origin_apply = '-1 0 0'; // third occupant sits in the back + break; + case 3: + origin_apply = '0 1 0'; // fourth occupant sits in the right + break; + case 4: + origin_apply = '0 -1 0'; // fifth occupant sits in the left + break; + case 5: + origin_apply = '1 1 0'; // sixth occupant sits in the front-right + break; + case 6: + origin_apply = '-1 1 0'; // seventh occupant sits in the back-right + break; + case 7: + origin_apply = '1 -1 0'; // eigth occupant sits in the front-left + break; + case 8: + origin_apply = '-1 -1 0'; // ninth occupant sits in the back-left break; default: break; -- 2.39.2