]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Respawn screen flash
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 12:56:02 +0000 (15:56 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 12:56:02 +0000 (15:56 +0300)
data/defaultVT.cfg
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c

index 0fcaf58ec36c983222f7fd7e23f2129eb2a65aa7..3b7bd6a57766931f8ccaceeac449230f9cbdbd79 100644 (file)
@@ -142,6 +142,8 @@ seta cl_flash_pickup_color "0 0 1" "color of the pickup flash"
 seta cl_flash_vore 0.25 "if enabled, the screen flashes by this amount when eating or getting eaten"\r
 seta cl_flash_vore_color_prey "1 0 0" "color of the vore flash for prey"\r
 seta cl_flash_vore_color_pred "0 1 0" "color of the vore flash for predators"\r
+seta cl_flash_respawn 0.25 "if enabled, the screen flashes by this amount when picking up an item"\r
+seta cl_flash_respawn_color "1 1 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 523538a551271242419a4ae944d7e561769c62b2..bf89e9a4257dfd24a8333f995bbf25ea87e49747 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, pickup_flash_time, vore_flash_laststate;\r
+float pickup_crosshair_time, pickup_crosshair_size, pickup_flash_time, vore_flash_laststate, respawn_flash_lasthealth;\r
 float myhealth, myhealth_prev, myhealth_flash;\r
 float contentavgalpha, liquidalpha_prev;\r
 float old_blurradius, old_bluralpha, old_sharpen_intensity;\r
@@ -1054,6 +1054,16 @@ void CSQC_UpdateView(float w, float h)
 \r
                vore_flash_laststate = vore_flash_state;\r
        }\r
+       if(cvar("cl_flash_respawn"))\r
+       {\r
+               float respawn_flash_health;\r
+               respawn_flash_health = getstati(STAT_HEALTH);\r
+\r
+               if(respawn_flash_lasthealth <= 0 && respawn_flash_health > 0)\r
+                       localcmd(strcat("bf ", cvar_string("cl_flash_respawn_color"), " ", cvar_string("cl_flash_respawn"), "\n"));\r
+\r
+               respawn_flash_lasthealth = respawn_flash_health;\r
+       }\r
 \r
        if not(getstati(STAT_VORE_EATEN)) // crosshair is useless if we're in the stomach\r
        {\r
index 8f17ff5c737badcf282942022833750561a11539..f3c370add024275efa0f7f79b17c114b34605b6b 100644 (file)
@@ -35,7 +35,7 @@ void fillVoretHudDialog(entity me)
        me.TR(me);\r
                me.TDempty(me, 0.2);\r
                me.TD(me, 1, 0.5, e = makeVoretCheckBoxEx(0.25, 0, "cl_flash_pickup", "Screen flashes"));\r
-               makeMulti(e, "cl_flash_vore");\r
+               makeMulti(e, "cl_flash_vore cl_flash_respawn");\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