]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When a round ends block players and switch to 3rd person view
authorterencehill <piuntn@gmail.com>
Fri, 16 Sep 2016 16:35:28 +0000 (18:35 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 16 Sep 2016 16:35:28 +0000 (18:35 +0200)
qcsrc/client/view.qc
qcsrc/common/stats.qh
qcsrc/server/defs.qh
qcsrc/server/round_handler.qc

index 3134a24ed28fed2c9b917d4d279b31053dee9b46..1e61038915f42816ae0e678575038455d5236abb 100644 (file)
@@ -742,7 +742,7 @@ bool WantEventchase(entity this)
 {
        if(autocvar_cl_orthoview)
                return false;
-       if(intermission)
+       if(STAT(GAMEOVER) || intermission)
                return true;
        if(this.viewloc)
                return true;
@@ -935,7 +935,7 @@ void HUD_Crosshair(entity this)
 {
        float f, i, j;
        vector v;
-       if(!scoreboard_active && !camera_active && intermission != 2 &&
+       if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAMEOVER) &&
                spectatee_status != -1 && !csqcplayer.viewloc && !MUTATOR_CALLHOOK(DrawCrosshair) &&
                !HUD_MinigameMenu_IsOpened() )
        {
index d6aa068ea67eb775da3cba979c9a62398e9cbcf2..252c0fdeca645b5378a76a2e6cbce001a7e69e48 100644 (file)
@@ -63,9 +63,10 @@ REGISTER_STAT(WEAPON_NEXTTHINK, float)
 #ifdef SVQC
 SPECTATE_COPYFIELD(_STAT(WEAPON_NEXTTHINK))
 float W_WeaponRateFactor(entity this);
+float gameover;
 #endif
 REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
-
+REGISTER_STAT(GAMEOVER, int, gameover)
 REGISTER_STAT(GAMESTARTTIME, float)
 REGISTER_STAT(STRENGTH_FINISHED, float)
 REGISTER_STAT(INVINCIBLE_FINISHED, float)
index b034968901e741e40d348952fdf7ef40ab16f9d9..8b1726a0a6ee978911e2afea1ef1349e7442c4bc 100644 (file)
@@ -129,7 +129,6 @@ const int W_TICSPERFRAME = 2;
 
 void weapon_defaultspawnfunc(entity this, Weapon e);
 
-float gameover;
 float intermission_running;
 float intermission_exittime;
 float alreadychangedlevel;
index 3b11c5f9b6f409e0d51948286cab7160041b3270..d060d2cca859590ce3ee92e1966daca1f1464e83 100644 (file)
@@ -12,6 +12,9 @@ void round_handler_Think(entity this)
        }
 
        if (gameover)
+               gameover = false;
+
+       if (intermission_running)
        {
                round_handler_Reset(0);
                round_handler_Remove();
@@ -55,6 +58,7 @@ void round_handler_Think(entity this)
                        // schedule a new round
                        this.wait = true;
                        this.nextthink = time + this.delay;
+                       gameover = true;
                }
                else
                {