]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Remove the smooth camera for prey entering the stomach. It was ugly to begin with...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 00:22:07 +0000 (03:22 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 00:22:07 +0000 (03:22 +0300)
data/defaultVT.cfg
data/qcsrc/server/constants.qh
data/qcsrc/server/defs.qh
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/vore.qc

index 8a18dcaa135078cfb2feab34f06481f1585e07a3..16e9c69fc989bf30eafcc3ff474e6b94d5a88831 100644 (file)
@@ -1527,7 +1527,6 @@ seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the
 seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"\r
 \r
 set cl_vore_stomachmodel 1 "when enabled, we see the stomach model around us when eaten. -1 = disabled, 1 = enabled, anything between = alpha"\r
-set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when swallowed, 0 disables"\r
 seta cl_vore_cutvolume_sound 0.75 "sound volume is reduced to this amount when you are in a stomach"\r
 seta cl_vore_cutvolume_music 0.25 "music volume is reduced to this amount when you are in a stomach"\r
 seta cl_vore_cutvolume_fade 0.1 "fading speed of the volume change"\r
index 4248ff5b37bb82d61a594a14221c799661a656c5..154a64966fde64979f7644fc1f2a924d08469741 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 35';\r
+vector PL_PREY_VIEW_OFS                        = '0 0 17';\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 cbf049f3474f75317f32580fe467da3433f17169..a927ba957bfa97a2ebe75ea9c12bec84617e319b 100644 (file)
@@ -335,7 +335,6 @@ float sv_clforceplayermodels;
 .float cvar_cl_gunalign;\r
 .float cvar_cl_noantilag;\r
 .float cvar_cl_vore_stomachmodel;\r
-.float cvar_cl_vore_cameraspeed;\r
 .float cvar_cl_vore_autodigest;\r
 .float cvar_chase_active;\r
 \r
index 0e9cf6cb5fb1cf93090bcf41cc69d71b0a19b1ff..30755d2c62341d86ad206f8feb54b6f15a745085 100644 (file)
@@ -616,7 +616,6 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_accuracy_data_receive, "cl_accuracy_data_receive");\r
        GetCvars_handleFloat(s, f, cvar_chase_active, "chase_active");\r
        GetCvars_handleFloat(s, f, cvar_cl_vore_stomachmodel, "cl_vore_stomachmodel");\r
-       GetCvars_handleFloat(s, f, cvar_cl_vore_cameraspeed, "cl_vore_cameraspeed");\r
        GetCvars_handleFloat(s, f, cvar_cl_vore_autodigest, "cl_vore_autodigest");\r
 \r
        self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share);\r
index eb9ab112b0e0ee53d02e6e9fbce9002108dbdaed..6c7e0c2c2cdca8c435fc00b224a23876a43e86e5 100644 (file)
@@ -119,36 +119,13 @@ float Vore_CanLeave()
        return FALSE;\r
 }\r
 \r
-// make the camera smoothly lower itself when we get swallowed\r
-// our aim is going from the normal view offset to half of the view offset (because half is the best positioning for the stomach model)\r
-.float cameraeffect_current, cameraeffect_target;\r
-void Vore_CameraEffect_Set(entity e)\r
-{\r
-       e.cameraeffect_current = 1;\r
-       e.cameraeffect_target = 2;\r
-}\r
-void Vore_CameraEffect_Apply()\r
+// position the camera properly for prey\r
+void Vore_SetCamera()\r
 {\r
        if not(self.predator.classname == "player" || self.fakeprey > 1)\r
                return;\r
 \r
-       if(self.cvar_cl_vore_cameraspeed)\r
-       {\r
-               local float step;\r
-               step = self.cvar_cl_vore_cameraspeed * frametime;\r
-\r
-               // not sure if these maths are good, as the effect should be smoother\r
-               if(self.cameraeffect_current >= self.cameraeffect_target + step)\r
-                       self.cameraeffect_current -= step;\r
-               else if(self.cameraeffect_current <= self.cameraeffect_target - step)\r
-                       self.cameraeffect_current += step;\r
-       }\r
-       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
+       self.view_ofs = PL_PREY_VIEW_OFS;\r
 \r
        float prey_height;\r
        if(self.fakeprey > 1)\r
@@ -219,8 +196,6 @@ void Vore_Swallow(entity e)
        if(e.flagcarried)\r
                DropFlag(e.flagcarried, world, e.predator);\r
 \r
-       Vore_CameraEffect_Set(e);\r
-\r
        if(stov(cvar_string("g_vore_regurgitatecolor_release")))\r
                e.colormod = stov(cvar_string("g_vore_regurgitatecolor_release"));\r
 \r
@@ -632,7 +607,7 @@ void Vore()
 // Code that addresses the prey:\r
 // --------------------------------\r
 \r
-       Vore_CameraEffect_Apply();\r
+       Vore_SetCamera();\r
 \r
        // keepdeadprey - detach dead prey if their predator died or got swallowed\r
        if(self.fakepredator.classname == "player")\r