From 854587fa6ac26bc151aaec95d0bd86c32fd6b714 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 13 Jul 2011 17:50:39 +0300 Subject: [PATCH] Fix another hole in my vore flash code --- data/qcsrc/client/View.qc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index f1aeeec7..164fc951 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -1044,8 +1044,6 @@ void CSQC_UpdateView(float w, float h) pickup_flash_time = getstatf(STAT_LAST_PICKUP); } if(cvar("cl_flash_vore")) - if(!respawned) // guards against a bug - if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different stomach load { float vore_flash_state; if(getstati(STAT_VORE_EATEN)) @@ -1053,11 +1051,15 @@ void CSQC_UpdateView(float w, float h) else vore_flash_state = getstati(STAT_VORE_LOAD); - if(vore_flash_state > vore_flash_laststate && vore_flash_state > 0) // stomach load is bigger, so we ate someone - localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_pred"), " ", cvar_string("cl_flash_vore"), "\n")); - if(vore_flash_state < vore_flash_laststate && vore_flash_state < 0) // -1 means we have been eaten - localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_prey"), " ", cvar_string("cl_flash_vore"), "\n")); + if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different stomach load + { + if(vore_flash_state > vore_flash_laststate && vore_flash_state > 0) // stomach load is bigger, so we ate someone + localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_pred"), " ", cvar_string("cl_flash_vore"), "\n")); + if(vore_flash_state < vore_flash_laststate && vore_flash_state < 0) // -1 means we have been eaten + localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_prey"), " ", cvar_string("cl_flash_vore"), "\n")); + } + // always update the last vore state, or the flash can be triggered when switching spectated players one frame after vore_flash_laststate = vore_flash_state; } if(cvar("cl_flash_respawn")) -- 2.39.2