]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Cover some holes in my last code
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 14:36:06 +0000 (17:36 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 13 Jul 2011 14:36:06 +0000 (17:36 +0300)
data/qcsrc/client/View.qc

index 3507b274b6faf82857d1cff8231e2bb1a77fe270..f1aeeec786295683c3d731d05b72a20b91cedfd5 100644 (file)
@@ -297,8 +297,8 @@ void CSQC_UpdateView(float w, float h)
        pmove_org = warpzone_fixview_origin - vo;\r
        input_angles = warpzone_fixview_angles;\r
 \r
-       if(last_health <= 0 && getstati(STAT_HEALTH) > 0)\r
-       if not(spectatee_status > 0 && last_spectatee != spectatee_status) // not if we switched players and that detects a different health\r
+       if((last_health <= 0 && getstati(STAT_HEALTH) > 0) || (!spectatee_status && last_spectatee)) // also cover switching from a spectator to a player instantly\r
+       if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different health\r
                respawned = TRUE; // stays true for one frame\r
 \r
        // event chase camera\r
@@ -1045,7 +1045,7 @@ void CSQC_UpdateView(float w, float h)
        }\r
        if(cvar("cl_flash_vore"))\r
        if(!respawned) // guards against a bug\r
-       if not(spectatee_status > 0 && last_spectatee != spectatee_status) // not if we switched players and that detects a different stomach load\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