From: MirceaKitsune Date: Wed, 6 Jul 2011 21:53:10 +0000 (+0300) Subject: Pickup flash effect, for more eye candy X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=bd1fc4ae994b5bad1389334247f76a0cd7d51b3e Pickup flash effect, for more eye candy --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 48b31cda..0545b7ce 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -134,10 +134,11 @@ seta cl_artwork_lose 2 "number of artwork_lost_ images available in the gfx fold seta cl_artwork_stretch 0 "stretch artwork to fit the screen, even if it brakes image proportions" seta cl_artwork_alpha 1 "artwork alpha" seta cl_artwork_fade 0.3 "artwork fade in speed" - seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)" seta cl_reticle_item_weapon 1 "draw aiming reticle for weapon zoom, 0 disables and values between 0 and 1 change alpha" seta cl_reticle_item_normal 1 "draw reticle when zooming without a weapon, 0 disables and values between 0 and 1 change alpha" +seta cl_flash_pickup 0.25 "if enabled, the screen flashes by this amount when picking up an item" +seta cl_flash_pickup_color "0 0 1" "color of the pickup flash" fov 90 seta cl_velocityzoom -0.2 "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 3aa7f7c9..f88392ea 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -253,7 +253,7 @@ float camera_mode; float reticle_type; float chase_active_old; float artwork_fade; -float pickup_crosshair_time, pickup_crosshair_size; +float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time; float myhealth, myhealth_prev, myhealth_flash; float contentavgalpha, liquidalpha_prev; float old_blurradius, old_bluralpha, old_sharpen_intensity; @@ -1153,6 +1153,13 @@ void CSQC_UpdateView(float w, float h) wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup"); } + if(cvar("cl_flash_pickup")) + if(pickup_flash_time < getstatf(STAT_LAST_PICKUP)) + { + localcmd(strcat("bf ", cvar_string("cl_flash_pickup_color"), " ", cvar_string("cl_flash_pickup"), "\n")); + pickup_flash_time = getstatf(STAT_LAST_PICKUP); + } + if(shottype == SHOTTYPE_HITENEMY) wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0 if(shottype == SHOTTYPE_HITTEAM) diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c index d7bd9652..9d1aca64 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c @@ -28,10 +28,12 @@ void fillVoretHudDialog(entity me) me.TR(me); me.TDempty(me, 0.2); sl = makeVoretSlider(0.1, 1, 0.05, "hud_damage"); - me.TD(me, 1, 2, e = makeVoretSliderCheckBox(0, 1, sl, "Splashes:")); - me.TD(me, 1, 3, sl); + me.TD(me, 1, 0.8, e = makeVoretSliderCheckBox(0, 1, sl, "Splashes:")); + me.TD(me, 1, 1.5, sl); makeMulti(e, "hud_stomach"); makeMulti(sl, "hud_stomach"); + me.TDempty(me, 0.4); + me.TD(me, 1, 0.5, e = makeVoretCheckBoxEx(0.25, 0, "cl_flash_pickup", "Pickup flashes")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2, e = makeVoretCheckBox(0, "cl_reticle_item_normal", "Zoom reticles"));