Finalize the effect. Not really what I wanted but it's good for now
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:08:00 +0000 (02:08 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:08:00 +0000 (02:08 +0300)
data/defaultVoretournament.cfg
data/qcsrc/server/defs.qh
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/vore.qc

index 5d62f8ac049b8cae7bebdfb41e2b3610d1ded151..2c815b43916485bd8f5adcf8fbd7478a0523a243 100644 (file)
@@ -1498,6 +1498,7 @@ 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 0 and 1 = alpha"\r
+set cl_vore_cameraspeed 1.5 "speed at which you see yourself sliding down when getting swallowed, 0 disables"\r
 set g_vore_regurgitatecolor_released "0.75 1 0.5" "the color players will have when released from the stomach alive"\r
 set g_vore_regurgitatecolor_digested "-0.125 0.25 0" "the color players will have when released from the stomach digested"\r
 set g_vore_gurglesound 1 "predators make an ambient gurgling sound"\r
index 6a6a9aa69772e7410b5d17276ad1df97e0c72c9c..0e2bce89e13dbd266ac6051464b45d54b9fbf254 100644 (file)
@@ -332,8 +332,9 @@ float sv_clforceplayermodels;
 #endif\r
 .float cvar_cl_gunalign;\r
 .float cvar_cl_noantilag;\r
-.float cvar_chase_active;\r
 .float cvar_cl_vore_stomachmodel;\r
+.float cvar_cl_vore_cameraspeed;\r
+.float cvar_chase_active;\r
 \r
 void Announce(string snd);\r
 void AnnounceTo(entity e, string snd);\r
index 65af9b2c753a510ddadde4d3759c6975fc08b2d0..e897ff0ffa570c917ca02f7d6052821f6ca5a35c 100644 (file)
@@ -616,6 +616,7 @@ 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
 \r
        self.cvar_cl_accuracy_data_share = boolean(self.cvar_cl_accuracy_data_share);\r
        self.cvar_cl_accuracy_data_receive = boolean(self.cvar_cl_accuracy_data_receive);\r
index fede02e63767dff5f4f55a0f7cd9c191b3073a9c..1a3fa9e40f4bd1fc1d47969e77ca3c291ace4702 100644 (file)
@@ -69,15 +69,19 @@ void Vore_CameraEffect_Apply()
        if(self.eater.classname != "player")\r
                return;\r
 \r
-       local float step;\r
-       step = 2 * frametime; // CVAR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+       if(self.cvar_cl_vore_cameraspeed)\r
+       {\r
+               local float step;\r
+               step = self.cvar_cl_vore_cameraspeed * frametime;\r
 \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
+               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
-bprint(strcat(ftos(self.cameraeffect_current), "<<-----------\n"));\r
        self.view_ofs_z = self.vore_oldview_ofs_z / self.cameraeffect_current;\r
 }\r
 \r