Base prey view height on the size difference between them and their predator.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 23:05:23 +0000 (02:05 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 23:05:23 +0000 (02:05 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/constants.qh
data/qcsrc/server/vore.qc

index 800a4c3c6b3dfb703165a66b1ccce6d2a0894bd9..a57f412851b36447387db51db9ceb938fd251b57 100644 (file)
@@ -1552,6 +1552,7 @@ set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping
 set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
 set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
 set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size"\r
+set g_healthsize_vore_pos 4 "Amount by which view height changes for prey, based on the size difference between them and their predator"\r
 set g_healthsize_min 50 "Player size may not drop below this amount of health"\r
 set g_healthsize_max 150 "Player size may not grow past this amount of health"\r
 \r
index 7bab869432e0e17ba68ac7743e31fc78e88e0918..cc858f40672fcddd43dba3c3c5209aea93a4950a 100644 (file)
@@ -2253,7 +2253,7 @@ void ApplyHealthSize()
        if not(cvar("g_healthsize"))\r
                return;\r
 \r
-               self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
+       self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize");\r
 \r
        // The following code sets the bounding box to match the player's size.\r
        // It is currently disabled because of issues with engine movement prediction (cl_movement).\r
index 4452d487d1752b9c3e8ae3cce3a801bc3e26af9b..4248ff5b37bb82d61a594a14221c799661a656c5 100644 (file)
@@ -130,7 +130,7 @@ vector      PL_MAX                                  = '16 16 45';
 vector PL_CROUCH_VIEW_OFS                      = '0 0 15';\r
 vector PL_CROUCH_MIN                           = '-16 -16 -24';\r
 vector PL_CROUCH_MAX                           = '16 16 25';\r
-vector PL_PREY_VIEW_OFS                        = '0 0 15';\r
+vector PL_PREY_VIEW_OFS                        = '0 0 35';\r
 \r
 // Sajt - added these, just as constants. Not sure how you want them actually put in the game, but I just\r
 // did this so at least they worked\r
index d755ddf5266ed339e4ddc14d38141b97d02f25c7..b2fa9e6077cdcf1c8298a55a2e83c40d24a207cb 100644 (file)
@@ -146,11 +146,16 @@ void Vore_CameraEffect_Apply()
        else\r
                self.cameraeffect_current = self.cameraeffect_target;\r
 \r
+       self.view_ofs_x = PL_PREY_VIEW_OFS_x;\r
+       self.view_ofs_y = PL_PREY_VIEW_OFS_y;\r
        self.view_ofs_z = PL_PREY_VIEW_OFS_z / self.cameraeffect_current;\r
-       if(self.predator.scale)\r
-               self.view_ofs_z *= self.predator.scale;\r
-       else if(self.fakepredator.scale)\r
-               self.view_ofs_z *= self.fakepredator.scale;\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