]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Tweaks to how the predator's angles are applied to prey positions
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index 0202e5af6d194751dd974b96efa6bcb93752cd43..77e1d4cdbbd3114333d388e28c9984c0c27c4c44 100644 (file)
@@ -107,7 +107,6 @@ void Vore_SetCamera()
        oldup = v_up;\r
 \r
        makevectors(self.v_angle);\r
        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
 \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
                                        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
                        position_counter += 1;\r
                }\r
        }\r