From 51d0e72ccdba1f02311ac0b25b7919698c9aed2d Mon Sep 17 00:00:00 2001 From: FruitieX Date: Tue, 16 Nov 2010 10:40:47 +0200 Subject: [PATCH] draw a fullscreen cyan tint when frozen, easy to add/replace with an image later --- defaultXonotic.cfg | 2 ++ qcsrc/client/View.qc | 4 ++++ qcsrc/common/constants.qh | 3 +++ qcsrc/server/g_world.qc | 3 +++ 4 files changed, 12 insertions(+) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 6e6faaba3..583b5a389 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 1c58d3904..f84ebe01d 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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(); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 3f95ed19e..c072213f1 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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 diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index db5c36094..126a6e775 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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); -- 2.39.2