From e7a7663024d84d68e5bdd7b176617cf26f380d37 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 19 Nov 2011 19:29:14 +0200 Subject: [PATCH] Change how the autodigest preference works. 0 disables, 1 automates digestion for items only, 2 for both items and players --- data/defaultVT.cfg | 2 +- data/qcsrc/menu/voret/dialog_settings_input.c | 7 ++++++- data/qcsrc/server/t_items.qc | 3 ++- data/qcsrc/server/vore.qc | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index a4762511..02da4091 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1607,7 +1607,7 @@ seta cl_vore_stomachmodel 1 "when enabled, we see the stomach model around us wh seta cl_vore_swallowmodel 1 "when enabled, we see the swallow model around us while getting eaten. -1 = disabled, 1 = enabled, anything between = alpha" seta cl_vore_cutvolume_sound 0.25 "sound volume is reduced by this amount when you are in a stomach or being swallowed" seta cl_vore_cutvolume_music 0.85 "music volume is reduced by this amount when you are in a stomach or being swallowed" -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_autodigest 1 "when enabled, the player will automatically begin digesting stuff as long as no team mates are inside. 0 = disabled, 1 = items, 2 = items & players" seta cl_vore_vieweffects_idlescale_predator 35 "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 50 "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 15 "the view will move around by this ammount while in the stomach, reserves the cvar v_idlescale" diff --git a/data/qcsrc/menu/voret/dialog_settings_input.c b/data/qcsrc/menu/voret/dialog_settings_input.c index 5e7b8ca2..f902ccc1 100644 --- a/data/qcsrc/menu/voret/dialog_settings_input.c +++ b/data/qcsrc/menu/voret/dialog_settings_input.c @@ -75,6 +75,11 @@ void fillVoretInputSettingsTab(entity me) me.TD(me, 1, 3, e = makeVoretCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys")); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeVoretCheckBox(0, "cl_vore_autodigest", "Automatic digestion")); + me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Automatic digestion:")); + me.TD(me, 1, 2, e = makeVoretTextSlider("cl_vore_autodigest")); + e.addValue(e, "Disabled", "0"); + e.addValue(e, "Items", "1"); + e.addValue(e, "Items & Players", "2"); + e.configureVoretTextSliderValues(e); } #endif diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index a9f3ee52..54af0c60 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -351,7 +351,8 @@ void Item_Consumable_Spawn(entity e, entity pl) pl.punchangle_x -= cvar("g_balance_vore_swallow_predator_punchangle_item"); pl.regurgitate_prepare = 0; pl.action_delay = time + cvar("g_balance_vore_action_delay"); - Vore_AutoDigest(pl); + if(pl.cvar_cl_vore_autodigest > 0) + Vore_AutoDigest(pl); } void Item_DroppedConsumable_Touch() diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index b0903602..b6e40b95 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -312,8 +312,9 @@ void Vore_Swallow(entity e) e.predator.regurgitate_prepare = 0; e.predator.spawnshieldtime = 0; // lose spawn shield when we vore e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them - Vore_AutoDigest(e.predator); Vore_SetPreyPositions(e.predator); + if(e.predator.cvar_cl_vore_autodigest > 1) + Vore_AutoDigest(e.predator); // block firing for a small amount of time, or we'll be firing the next frame after we swallow e.predator.weapon_delay = time + button_delay_time; -- 2.39.2