From: MirceaKitsune Date: Fri, 25 Feb 2011 23:12:30 +0000 (+0200) Subject: Remove the stomach splash effect at respawn X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6df6dfde348e2f189767d98acc5db89aa7a62224;p=voretournament%2Fvoretournament.git Remove the stomach splash effect at respawn --- 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); }