]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Tweaks to how the predator's angles are applied to prey positions
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 23:04:00 +0000 (02:04 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 23:04:00 +0000 (02:04 +0300)
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
-       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