From 6df6dfde348e2f189767d98acc5db89aa7a62224 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 26 Feb 2011 01:12:30 +0200 Subject: [PATCH 1/1] Remove the stomach splash effect at respawn --- data/qcsrc/client/View.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index f221da7f..0045ac9d 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -255,7 +255,7 @@ float artwork_fade; float pickup_crosshair_time, pickup_crosshair_size; float myhealth, myhealth_prev, myhealth_flash; float contentavgalpha, liquidalpha_prev; -float stomachsplash_alpha; +float stomachsplash_alpha, stomachsplash_remove_at_respawn; vector myhealth_gentlergb; vector liquidcolor_prev; vector damage_blurpostprocess, content_blurpostprocess; @@ -607,6 +607,12 @@ void CSQC_UpdateView(float w, float h) else stomachsplash_alpha = 0; } + if (getstati(STAT_HEALTH) <= 0) + stomachsplash_remove_at_respawn = 1; // schedule the effect to be removed next respawn + + if(getstati(STAT_HEALTH) > 0 && stomachsplash_remove_at_respawn) + stomachsplash_alpha = stomachsplash_remove_at_respawn = 0; // we respawned, remove the effect + stomachsplash_alpha = bound(0, stomachsplash_alpha, 1); drawpic('0 0 0', "gfx/food", '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, stov(cvar_string("hud_stomach_color")), stomachsplash_alpha, DRAWFLAG_NORMAL); } -- 2.39.2