]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't allow immediate manual join too
authorterencehill <piuntn@gmail.com>
Fri, 6 Apr 2018 21:48:56 +0000 (23:48 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 6 Apr 2018 21:48:56 +0000 (23:48 +0200)
qcsrc/server/client.qc

index e0f7b979c2da12a1621e2db236202c6c44cdd952..01b5055cdb8ba509a57444c80db5ea7b9f671a72 100644 (file)
@@ -2130,9 +2130,11 @@ void PrintWelcomeMessage(entity this)
        }
 }
 
+const int MIN_SPEC_TIME = 1;
 bool joinAllowed(entity this)
 {
        if (CS(this).version_mismatch) return false;
+       if (time < CS(this).jointime + MIN_SPEC_TIME) return false;
        if (!nJoinAllowed(this, this)) return false;
        if (teamplay && lockteams) return false;
        if (ShowTeamSelection(this)) return false;
@@ -2563,7 +2565,6 @@ void PlayerPreThink (entity this)
        if (IS_REAL_CLIENT(this))
                PrintWelcomeMessage(this);
 
-       local const int MIN_SPEC_TIME = 1;
        if (IS_PLAYER(this)) {
                if (IS_REAL_CLIENT(this) && time < CS(this).jointime + MIN_SPEC_TIME)
                        error("Client can't be spawned as player on connection!");