From: terencehill Date: Tue, 2 Jun 2020 15:09:36 +0000 (+0200) Subject: Part 2 of "Check joinAllowed again before actually joining, fixes race conditions... X-Git-Tag: xonotic-v0.8.5~959 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8fced9f7f3453efa0f26e16da200d178e7a4aae9;p=xonotic%2Fxonotic-data.pk3dir.git Part 2 of "Check joinAllowed again before actually joining, fixes race conditions where players can bypass the player limit" (perform the same check when spectating another player) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index af2846c8c..ce495c347 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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; } }