Re-integrate prey view offset based on scale with the new prey positioning code
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 23:37:44 +0000 (02:37 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 23:37:44 +0000 (02:37 +0300)
data/qcsrc/server/vore.qc

index f9476c0..94b8d18 100644 (file)
@@ -156,6 +156,11 @@ void Vore_SetPreyPositions()
                        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
 \r
+                       // change prey height based on scale\r
+                       float prey_height;\r
+                               prey_height = (head.scale - self.scale) * cvar("g_healthsize_vore_pos");\r
+                       head.view_ofs_z += prey_height;\r
+\r
                        position_counter += 1;\r
                }\r
        }\r
@@ -163,13 +168,6 @@ void Vore_SetPreyPositions()
        v_forward = oldforward;\r
        v_right = oldright;\r
        v_up = oldup;\r
-\r
-       /*float prey_height;\r
-       if(self.fakeprey)\r
-               prey_height = (self.scale - self.fakepredator.scale) * cvar("g_healthsize_vore_pos");\r
-       else\r
-               prey_height = (self.scale - self.predator.scale) * cvar("g_healthsize_vore_pos");\r
-       self.view_ofs_z += prey_height;*/\r
 }\r
 \r
 .float gurgle_oldstomachload;\r