Tweaks to how the predator's angles are applied to prey positions
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 0202e5a..77e1d4c 100644 (file)
@@ -107,7 +107,6 @@ void Vore_SetCamera()
        oldup = v_up;\r
 \r
        makevectors(self.v_angle);\r
-       v_forward_z = 0;\r
 \r
        // In order to allow prey to see each other in the stomach, we must position each occupant differently,\r
        // else all players would overlap in the center. To do this, we run a loop on all players in the same stomach.\r
@@ -150,7 +149,9 @@ void Vore_SetCamera()
                                        break;\r
                        }\r
                        // since prey have their predators set as an aiment, view_ofs will specify the real origin of prey, not just the view offset\r
-                       head.view_ofs = PL_PREY_VIEW_OFS + (v_forward + origin_apply * cvar("g_vore_neighborprey_distance"));\r
+                       origin_apply_x *= v_forward_x; // position depends on the predator's rotation\r
+                       origin_apply_y *= v_forward_y; // position depends on the predator's rotation\r
+                       head.view_ofs = PL_PREY_VIEW_OFS + origin_apply * cvar("g_vore_neighborprey_distance");\r
                        position_counter += 1;\r
                }\r
        }\r