]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
draw a fullscreen cyan tint when frozen, easy to add/replace with an image later
authorFruitieX <fruitiex@gmail.com>
Tue, 16 Nov 2010 08:40:47 +0000 (10:40 +0200)
committerFruitieX <fruitiex@gmail.com>
Tue, 16 Nov 2010 08:40:47 +0000 (10:40 +0200)
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/common/constants.qh
qcsrc/server/g_world.qc

index 6e6faaba39d6e77a696c8b3455c8900e9d2f13b0..583b5a38963c9b70bd5ac37e525b7d6d78f35df2 100644 (file)
@@ -1419,6 +1419,8 @@ seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_ch
 seta hud_showbinds 1   "the way to show the keys to press in HUD messages: 0 displays commands, 1 bound keys, 2 both"
 seta hud_showbinds_limit 2     "maximum number of bound keys to show for a command. 0 for unlimited"
 
+seta hud_colorflash_alpha 0.5 "starting alpha of the color flash"
+
 // scoreboard
 seta scoreboard_columns default
 seta scoreboard_border_thickness 1 "scoreboard border thickness"
index 1c58d390450f2a57cb59d89e3f766d4894b44713..f84ebe01dd91a4040f3791b65b3343a420fe2de9 100644 (file)
@@ -695,6 +695,10 @@ void CSQC_UpdateView(float w, float h)
         CSQC_RAPTOR_HUD();
        else
        {
+               if(gametype == GAME_FREEZETAG)
+                       if(getstati(STAT_FROZEN))
+                               drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, '0.25 0.90 1', cvar("hud_colorflash_alpha"), DRAWFLAG_ADDITIVE);
+
                if(cvar("r_letterbox") == 0)
                        if(cvar("viewsize") < 120)
                                CSQC_common_hud();
index 3f95ed19e0d7e9e838abce40c234210d1499cd68..c072213f14c29620e135cd81d2160a4875f11ea8 100644 (file)
@@ -345,6 +345,9 @@ const float STAT_BLUEALIVE = 101;
 const float STAT_YELLOWALIVE = 102;
 const float STAT_PINKALIVE = 103;
 
+// freeze tag
+const float STAT_FROZEN = 104;
+
 //const float STAT_SPIDERBOT_AIM     53 // compressShotOrigin
 //const float STAT_SPIDERBOT_TARGET  54 // compressShotOrigin
 
index db5c360945f6c3e763716301819e926bb3d7f590..126a6e7759ed3d43c5796f6155f0291b7217ed3e 100644 (file)
@@ -816,6 +816,9 @@ void spawnfunc_worldspawn (void)
                addstat(STAT_YELLOWALIVE, AS_INT, yellowalive_stat);
                addstat(STAT_PINKALIVE, AS_INT, pinkalive_stat);
        }
+       if(g_freezetag)
+               addstat(STAT_FROZEN, AS_INT, freezetag_frozen);
+
        // g_movementspeed hack
        addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
        addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);