]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Add a new vore effect, causing v_idlescale (wavering view) to get set when swallowing...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 22:09:30 +0000 (00:09 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 22:09:30 +0000 (00:09 +0200)
data/defaultVT.cfg
data/qcsrc/client/View.qc
data/qcsrc/common/constants.qh
data/qcsrc/server/cl_client.qc
data/qcsrc/server/g_world.qc

index c50f621d8d4015ab1b59c00e6c30ff210bd20968..5cf82096f72d4ea394b36613d94dfff95ba76152 100644 (file)
@@ -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"\r
 seta cl_vore_cutvolume_fade 0.1 "fading speed of the volume change"\r
 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)"\r
+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"\r
+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"\r
+seta cl_vore_vieweffects_idlescale_stomach 50 "the view will move around by this ammount while in the stomach, reserves the cvar v_idlescale"\r
 set g_vore 1 "enables the vore system, you want this on!"\r
 set g_vore_digestion 1 "enables digestion system, you want this on!"\r
 set g_vore_kick 1 "enables stomach kick system, you want this on!"\r
index bb51586b55ef7a75899dd35d8c7d1e4036e72e72..bf8ea4e6517a978bc24f80f1114c746804cfee81 100644 (file)
@@ -416,6 +416,26 @@ void CSQC_UpdateView(float w, float h)
                }\r
        }\r
 \r
+       float apply_idlescale;\r
+       if(cvar("cl_vore_vieweffects_idlescale_prey"))\r
+       {\r
+               apply_idlescale += getstatf(STAT_VORE_PROGRESS_PREY) * cvar("cl_vore_vieweffects_idlescale_prey");\r
+               if(cvar("v_idlescale") != apply_idlescale)\r
+                       cvar_clientsettemp("v_idlescale", ftos(apply_idlescale));\r
+       }\r
+       if(cvar("cl_vore_vieweffects_idlescale_predator"))\r
+       {\r
+               apply_idlescale += getstatf(STAT_VORE_PROGRESS_PRED) * cvar("cl_vore_vieweffects_idlescale_predator");\r
+               if(cvar("v_idlescale") != apply_idlescale)\r
+                       cvar_clientsettemp("v_idlescale", ftos(apply_idlescale));\r
+       }\r
+       if(cvar("cl_vore_vieweffects_idlescale_stomach"))\r
+       {\r
+               apply_idlescale += getstati(STAT_VORE_EATEN) * cvar("cl_vore_vieweffects_idlescale_stomach");\r
+               if(cvar("v_idlescale") != apply_idlescale)\r
+                       cvar_clientsettemp("v_idlescale", ftos(apply_idlescale));\r
+       }\r
+\r
        // Render the Scene\r
        if(!intermission || !view_set)\r
        {\r
index d2e24ff033a7a23c3f637c1871fd8a6d80da3181..2825c5ea259650da5e3db838fb029c104e3f41e9 100644 (file)
@@ -286,12 +286,14 @@ const float STAT_VORE_DIGESTING = 54;
 const float STAT_VORE_EATEN = 55;\r
 const float STAT_VORE_CANLEAVE = 56;\r
 const float STAT_VORE_CANSWALLOW = 57;\r
-const float STAT_CROSSHAIR_STYLE = 58;\r
-const float STAT_SBRING1_TYPE = 59;\r
-const float STAT_SBRING1_CLIP = 60;\r
-const float STAT_SBRING2_TYPE = 61;\r
-const float STAT_SBRING2_CLIP = 62;\r
-const float STAT_HUD = 63;\r
+const float STAT_VORE_PROGRESS_PREY = 58;\r
+const float STAT_VORE_PROGRESS_PRED = 59;\r
+const float STAT_CROSSHAIR_STYLE = 60;\r
+const float STAT_SBRING1_TYPE = 61;\r
+const float STAT_SBRING1_CLIP = 62;\r
+const float STAT_SBRING2_TYPE = 63;\r
+const float STAT_SBRING2_CLIP = 64;\r
+const float STAT_HUD = 65;\r
 const float HUD_NORMAL = 0;\r
 const float CTF_STATE_ATTACK = 1;\r
 const float CTF_STATE_DEFEND = 2;\r
index 6fb96a71a52c372b58e395f905d704677c981774..03bbc0aa91478966ff09c7a0c9276cfd7e20388c 100644 (file)
@@ -2117,6 +2117,8 @@ void SpectateCopy(entity spectatee) {
        self.fixangle = TRUE;\r
        self.stomach_load = spectatee.stomach_load;\r
        self.stat_eaten = spectatee.stat_eaten;\r
+       self.swallow_progress_prey = spectatee.swallow_progress_prey;\r
+       self.swallow_progress_pred = spectatee.swallow_progress_pred;\r
        self.stat_stomachload = spectatee.stat_stomachload;\r
        self.stat_stomachmaxload = spectatee.stomach_maxload;\r
        self.stat_digesting = spectatee.stat_digesting;\r
index f0022c7b89f106c3e900177908b5ee00cfd7a659..7f48c6b592cfd7d553187d86112cd76522654a5a 100644 (file)
@@ -664,6 +664,8 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting);\r
        addstat(STAT_VORE_EATEN, AS_INT, stat_eaten);\r
        addstat(STAT_VORE_CANLEAVE, AS_INT, stat_canleave);\r
+       addstat(STAT_VORE_PROGRESS_PREY, AS_FLOAT, swallow_progress_prey);\r
+       addstat(STAT_VORE_PROGRESS_PRED, AS_FLOAT, swallow_progress_pred);\r
        addstat(STAT_CROSSHAIR_STYLE, AS_INT, stat_crosshair_style);\r
        addstat(STAT_SBRING1_TYPE, AS_INT, stat_sbring1_type);\r
        addstat(STAT_SBRING1_CLIP, AS_FLOAT, stat_sbring1_clip);\r