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
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
.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
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
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
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
// 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