From 3b342f2d9f338675fb272b84b083dc75ee7e65e0 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 4 May 2011 01:09:50 +0300 Subject: [PATCH] First system for positioning prey differently in the stomach. Each frame, a loop will run. The position will be offset in a square shape for all occupants of that stomach. --- data/qcsrc/server/vore.qc | 42 ++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 29e01cdb..9a6f1b3c 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -98,17 +98,49 @@ float Vore_CanLeave() // position the camera properly for prey void Vore_SetCamera() { - if not(self.stat_eaten) - return; + /*if not(self.stat_eaten) + return;*/ + + local entity head; + local vector oldforward, oldright, oldup; + local float position_counter; + local vector origin_apply; + oldforward = v_forward; + oldright = v_right; + oldup = v_up; + + makevectors(self.v_angle); + v_forward_z = 0; + + FOR_EACH_PLAYER(head) + { + if(head.predator == self) + { + switch(position_counter) + { + case 0: + break; + case 1: + origin_apply = '1 0 0'; + break; + default: + break; + } + head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * 16); + position_counter += 1; + } + } - self.view_ofs = PL_PREY_VIEW_OFS; + v_forward = oldforward; + v_right = oldright; + v_up = oldup; - float prey_height; + /*float prey_height; if(self.fakeprey) prey_height = (self.scale - self.fakepredator.scale) * cvar("g_healthsize_vore_pos"); else prey_height = (self.scale - self.predator.scale) * cvar("g_healthsize_vore_pos"); - self.view_ofs_z += prey_height; + self.view_ofs_z += prey_height;*/ } .float gurgle_oldstomachload; -- 2.39.2