From: terencehill Date: Fri, 6 Apr 2018 21:48:56 +0000 (+0200) Subject: Don't allow immediate manual join too X-Git-Tag: xonotic-v0.8.5~2067^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=63b6be263ca5233c13a047ed20950494b53602ba;p=xonotic%2Fxonotic-data.pk3dir.git Don't allow immediate manual join too --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index e0f7b979c..01b5055cd 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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!");