From 831b7877c7c053016a31b0664388ba7c32560cc4 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 26 Sep 2010 17:19:31 +0300 Subject: [PATCH] Artwork fading effect --- data/defaultVoretournament.cfg | 3 +++ data/qcsrc/client/View.qc | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 454f0ffc..aed8ddca 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -116,6 +116,9 @@ seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact loc seta cl_artwork_won 2 "number of artwork_won_ images available in the gfx folder, 0 disables winning artwork" seta cl_artwork_lost 2 "number of artwork_lost_ images available in the gfx folder, 0 disables loosing artwork" seta cl_artwork_stretch 0 "stretch artwork to fit the screen, even if it brakes image proportions" +seta cl_artwork_fadespeed 0.5 "artwork fade-in speed" + + fov 90 seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out" seta cl_velocityzoomtime 0.3 "time value for averaging speed values" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index dea5d176..70b61f4d 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -251,6 +251,7 @@ float Sbar_WouldDrawScoreboard (); float view_set; float camera_mode; float chase_active_old; +float artwork_fade; string artwork_image; string NextFrameCommand; void CSQC_UpdateView(float w, float h) @@ -524,7 +525,12 @@ void CSQC_UpdateView(float w, float h) artwork_pos_y = (vid_conheight - artwork_size_y) / 2; } - drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', 1, DRAWFLAG_NORMAL); + if(artwork_fade < 1) + artwork_fade += frametime * cvar("cl_artwork_fadespeed"); + else + artwork_fade = 1; + + drawpic(artwork_pos, artwork_image, artwork_size, '1 1 1', artwork_fade, DRAWFLAG_NORMAL); } else { @@ -533,6 +539,7 @@ void CSQC_UpdateView(float w, float h) strunzone(artwork_image); artwork_image = ""; } + artwork_fade = 0; } // draw sbar -- 2.39.2