]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix another hole in my vore flash code
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 14:50:39 +0000 (17:50 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 14:50:39 +0000 (17:50 +0300)
data/qcsrc/client/View.qc

index f1aeeec786295683c3d731d05b72a20b91cedfd5..164fc9516b53c2ccc2027a76a132b731e2afb4c3 100644 (file)
@@ -1044,8 +1044,6 @@ void CSQC_UpdateView(float w, float h)
                pickup_flash_time = getstatf(STAT_LAST_PICKUP);\r
        }\r
        if(cvar("cl_flash_vore"))\r
-       if(!respawned) // guards against a bug\r
-       if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different stomach load\r
        {\r
                float vore_flash_state;\r
                if(getstati(STAT_VORE_EATEN))\r
@@ -1053,11 +1051,15 @@ void CSQC_UpdateView(float w, float h)
                else\r
                        vore_flash_state = getstati(STAT_VORE_LOAD);\r
 \r
-               if(vore_flash_state > vore_flash_laststate && vore_flash_state > 0) // stomach load is bigger, so we ate someone\r
-                       localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_pred"), " ", cvar_string("cl_flash_vore"), "\n"));\r
-               if(vore_flash_state < vore_flash_laststate && vore_flash_state < 0) // -1 means we have been eaten\r
-                       localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_prey"), " ", cvar_string("cl_flash_vore"), "\n"));\r
+               if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different stomach load\r
+               {\r
+                       if(vore_flash_state > vore_flash_laststate && vore_flash_state > 0) // stomach load is bigger, so we ate someone\r
+                               localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_pred"), " ", cvar_string("cl_flash_vore"), "\n"));\r
+                       if(vore_flash_state < vore_flash_laststate && vore_flash_state < 0) // -1 means we have been eaten\r
+                               localcmd(strcat("bf ", cvar_string("cl_flash_vore_color_prey"), " ", cvar_string("cl_flash_vore"), "\n"));\r
+               }\r
 \r
+               // always update the last vore state, or the flash can be triggered when switching spectated players one frame after\r
                vore_flash_laststate = vore_flash_state;\r
        }\r
        if(cvar("cl_flash_respawn"))\r