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 af2846c..ce495c3 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;
                        }
                }