]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Part 2 of "Check joinAllowed again before actually joining, fixes race conditions...
authorterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 15:09:36 +0000 (17:09 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 15:09:36 +0000 (17:09 +0200)
qcsrc/server/client.qc

index af2846c8cdaf84838a0fa38d8a9bc1f9d31edbf2..ce495c34709cb26be503743f0545b1db480e488a 100644 (file)
@@ -2363,7 +2363,8 @@ void SpectatorThink(entity this)
                        if(this.flags & FL_SPAWNING)
                        {
                                this.flags &= ~FL_SPAWNING;
-                               Join(this);
+                               if(joinAllowed(this))
+                                       Join(this);
                                return;
                        }
                }