Pickup flash effect, for more eye candy
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 6 Jul 2011 21:53:10 +0000 (00:53 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 6 Jul 2011 21:53:10 +0000 (00:53 +0300)
data/defaultVT.cfg
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c

index 48b31cda66911f95c720b0277975d8d57ce98557..0545b7ceec8a7bec3c7f5e713cdbecf277ac7ba8 100644 (file)
@@ -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"\r
 seta cl_artwork_alpha 1 "artwork alpha"\r
 seta cl_artwork_fade 0.3 "artwork fade in speed"\r
-\r
 seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"\r
 seta cl_reticle_item_weapon 1 "draw aiming reticle for weapon zoom, 0 disables and values between 0 and 1 change alpha"\r
 seta cl_reticle_item_normal 1 "draw reticle when zooming without a weapon, 0 disables and values between 0 and 1 change alpha"\r
+seta cl_flash_pickup 0.25 "if enabled, the screen flashes by this amount when picking up an item"\r
+seta cl_flash_pickup_color "0 0 1" "color of the pickup flash"\r
 fov 90\r
 seta cl_velocityzoom -0.2      "velocity based zooming of fov, negative values zoom out"\r
 seta cl_velocityzoomtime 0.3   "time value for averaging speed values"\r
index 3aa7f7c98c376d27893f7a8eb2ce4bf1188b9ce3..f88392ead701ff9805ddf4f8eebc554339112755 100644 (file)
@@ -253,7 +253,7 @@ float camera_mode;
 float reticle_type;\r
 float chase_active_old;\r
 float artwork_fade;\r
-float pickup_crosshair_time, pickup_crosshair_size;\r
+float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time;\r
 float myhealth, myhealth_prev, myhealth_flash;\r
 float contentavgalpha, liquidalpha_prev;\r
 float old_blurradius, old_bluralpha, old_sharpen_intensity;\r
@@ -1153,6 +1153,13 @@ void CSQC_UpdateView(float w, float h)
                                        wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");\r
                                }\r
 \r
+                               if(cvar("cl_flash_pickup"))\r
+                               if(pickup_flash_time < getstatf(STAT_LAST_PICKUP))\r
+                               {\r
+                                       localcmd(strcat("bf ", cvar_string("cl_flash_pickup_color"), " ", cvar_string("cl_flash_pickup"), "\n"));\r
+                                       pickup_flash_time = getstatf(STAT_LAST_PICKUP);\r
+                               }\r
+\r
                                if(shottype == SHOTTYPE_HITENEMY)\r
                                        wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0\r
                                if(shottype == SHOTTYPE_HITTEAM)\r
index d7bd96528b2e1db33a189f4649977e7bb14c1638..9d1aca645b7d20ffc408353ab4db7dee4302a725 100644 (file)
@@ -28,10 +28,12 @@ void fillVoretHudDialog(entity me)
        me.TR(me);\r
                me.TDempty(me, 0.2);\r
                sl = makeVoretSlider(0.1, 1, 0.05, "hud_damage");\r
-               me.TD(me, 1, 2, e = makeVoretSliderCheckBox(0, 1, sl, "Splashes:"));\r
-               me.TD(me, 1, 3, sl);\r
+               me.TD(me, 1, 0.8, e = makeVoretSliderCheckBox(0, 1, sl, "Splashes:"));\r
+               me.TD(me, 1, 1.5, sl);\r
                makeMulti(e, "hud_stomach");\r
                makeMulti(sl, "hud_stomach");\r
+               me.TDempty(me, 0.4);\r
+               me.TD(me, 1, 0.5, e = makeVoretCheckBoxEx(0.25, 0, "cl_flash_pickup", "Pickup flashes"));\r
        me.TR(me);\r
                me.TDempty(me, 0.2);\r
                me.TD(me, 1, 2, e = makeVoretCheckBox(0, "cl_reticle_item_normal", "Zoom reticles"));\r