From f56eb5149a6f8bca677b84847f7afcf25224ea10 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 16 Nov 2011 00:09:30 +0200 Subject: [PATCH] Add a new vore effect, causing v_idlescale (wavering view) to get set when swallowing, being swallowed, or being in the stomach --- data/defaultVT.cfg | 3 +++ data/qcsrc/client/View.qc | 20 ++++++++++++++++++++ data/qcsrc/common/constants.qh | 14 ++++++++------ data/qcsrc/server/cl_client.qc | 2 ++ data/qcsrc/server/g_world.qc | 2 ++ 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index c50f621d..5cf82096 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1601,6 +1601,9 @@ seta cl_vore_cutvolume_sound 0.75 "sound volume is reduced to this amount when y seta cl_vore_cutvolume_music 0.25 "music volume is reduced to this amount when you are in a stomach" seta cl_vore_cutvolume_fade 0.1 "fading speed of the volume change" seta cl_vore_autodigest 0 "when enabled, the player will automatically begin digesting enemy prey after eating them, as long as no team mates are inside (automated digest key)" +seta cl_vore_vieweffects_idlescale_predator 25 "the view will move around by this ammount while swallowing someone (based on progress), reserves the cvar v_idlescale" +seta cl_vore_vieweffects_idlescale_prey 35 "the view will move around by this ammount while being swallowed (based on progress), reserves the cvar v_idlescale" +seta cl_vore_vieweffects_idlescale_stomach 50 "the view will move around by this ammount while in the stomach, reserves the cvar v_idlescale" set g_vore 1 "enables the vore system, you want this on!" set g_vore_digestion 1 "enables digestion system, you want this on!" set g_vore_kick 1 "enables stomach kick system, you want this on!" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index bb51586b..bf8ea4e6 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -416,6 +416,26 @@ void CSQC_UpdateView(float w, float h) } } + float apply_idlescale; + if(cvar("cl_vore_vieweffects_idlescale_prey")) + { + apply_idlescale += getstatf(STAT_VORE_PROGRESS_PREY) * cvar("cl_vore_vieweffects_idlescale_prey"); + if(cvar("v_idlescale") != apply_idlescale) + cvar_clientsettemp("v_idlescale", ftos(apply_idlescale)); + } + if(cvar("cl_vore_vieweffects_idlescale_predator")) + { + apply_idlescale += getstatf(STAT_VORE_PROGRESS_PRED) * cvar("cl_vore_vieweffects_idlescale_predator"); + if(cvar("v_idlescale") != apply_idlescale) + cvar_clientsettemp("v_idlescale", ftos(apply_idlescale)); + } + if(cvar("cl_vore_vieweffects_idlescale_stomach")) + { + apply_idlescale += getstati(STAT_VORE_EATEN) * cvar("cl_vore_vieweffects_idlescale_stomach"); + if(cvar("v_idlescale") != apply_idlescale) + cvar_clientsettemp("v_idlescale", ftos(apply_idlescale)); + } + // Render the Scene if(!intermission || !view_set) { diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index d2e24ff0..2825c5ea 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -286,12 +286,14 @@ const float STAT_VORE_DIGESTING = 54; const float STAT_VORE_EATEN = 55; const float STAT_VORE_CANLEAVE = 56; const float STAT_VORE_CANSWALLOW = 57; -const float STAT_CROSSHAIR_STYLE = 58; -const float STAT_SBRING1_TYPE = 59; -const float STAT_SBRING1_CLIP = 60; -const float STAT_SBRING2_TYPE = 61; -const float STAT_SBRING2_CLIP = 62; -const float STAT_HUD = 63; +const float STAT_VORE_PROGRESS_PREY = 58; +const float STAT_VORE_PROGRESS_PRED = 59; +const float STAT_CROSSHAIR_STYLE = 60; +const float STAT_SBRING1_TYPE = 61; +const float STAT_SBRING1_CLIP = 62; +const float STAT_SBRING2_TYPE = 63; +const float STAT_SBRING2_CLIP = 64; +const float STAT_HUD = 65; const float HUD_NORMAL = 0; const float CTF_STATE_ATTACK = 1; const float CTF_STATE_DEFEND = 2; diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 6fb96a71..03bbc0aa 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2117,6 +2117,8 @@ void SpectateCopy(entity spectatee) { self.fixangle = TRUE; self.stomach_load = spectatee.stomach_load; self.stat_eaten = spectatee.stat_eaten; + self.swallow_progress_prey = spectatee.swallow_progress_prey; + self.swallow_progress_pred = spectatee.swallow_progress_pred; self.stat_stomachload = spectatee.stat_stomachload; self.stat_stomachmaxload = spectatee.stomach_maxload; self.stat_digesting = spectatee.stat_digesting; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index f0022c7b..7f48c6b5 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -664,6 +664,8 @@ void spawnfunc_worldspawn (void) addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting); addstat(STAT_VORE_EATEN, AS_INT, stat_eaten); addstat(STAT_VORE_CANLEAVE, AS_INT, stat_canleave); + addstat(STAT_VORE_PROGRESS_PREY, AS_FLOAT, swallow_progress_prey); + addstat(STAT_VORE_PROGRESS_PRED, AS_FLOAT, swallow_progress_pred); addstat(STAT_CROSSHAIR_STYLE, AS_INT, stat_crosshair_style); addstat(STAT_SBRING1_TYPE, AS_INT, stat_sbring1_type); addstat(STAT_SBRING1_CLIP, AS_FLOAT, stat_sbring1_clip); -- 2.39.2