From: MirceaKitsune Date: Wed, 16 Nov 2011 00:56:28 +0000 (+0200) Subject: New effect: Modify field of view based on side, to further induce the effect of being... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d1d347a9a53e0c3aa124d5d2ce8d9eebaa3634f;p=voretournament%2Fvoretournament.git New effect: Modify field of view based on side, to further induce the effect of being little or small --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index bf872ce8..16e62eae 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1630,6 +1630,7 @@ set g_vore_regurgitatecolor_particles 0.75 "players who are dirty from regurgita set g_vore_neighborprey_distance 8 "Distance by which prey inside the same stomach are positioned away from each other. 0 disables seeing neighboring prey" set g_vore_swallowmodel_range 100 "Distance by which the swallow model oscillates based on swallow progress" +seta cl_healthsize_fov 0.2 "offset field of view by this amount based on size, to further induce the effect of being large or small" set g_healthsize 1 "Players shrink and grow based on health, by this amount" set g_healthsize_center 100 "Health at which the player has the default size" set g_healthsize_min 50 "Player size may not drop below this amount of health" @@ -1653,6 +1654,8 @@ set volume $menu_volume set bgmvolume $menu_bgmvolume set mastervolume 1.4 +seta menu_fov 90 + set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file" set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 75ab1be9..b958a4ad 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -416,6 +416,16 @@ void CSQC_UpdateView(float w, float h) } } + float apply_fov; + apply_fov = cvar("menu_fov"); + if(cvar("cl_healthsize_fov") && frametime) + { + if(g_healthsize_center) + apply_fov += (g_healthsize_center - bound(g_healthsize_min, getstati(STAT_HEALTH), g_healthsize_max)) * cvar("cl_healthsize_fov"); + if(cvar("gov") != apply_fov) + cvar_set("fov", ftos(apply_fov)); + } + float apply_idlescale; if(cvar("cl_vore_vieweffects_idlescale_prey") && frametime) { diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c index 167f9dab..ed19cc54 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup.c @@ -89,7 +89,7 @@ void fillVoretPlayerSettingsTab(entity me) me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Field of View:")); - me.TD(me, 1, 2, e = makeVoretSlider(60, 130, 1, "fov")); + me.TD(me, 1, 2, e = makeVoretSlider(60, 130, 1, "menu_fov")); me.TR(me); me.TD(me, 1, 1, e = makeVoretTextLabel(0, "Velocity zoom:")); me.TD(me, 1, 2, e = makeVoretSlider(-2, 2, 0.1, "cl_velocityzoom"));