From: terencehill Date: Wed, 2 Jan 2013 08:52:12 +0000 (+0100) Subject: Arena: centerprint "Waiting for players to join..." when alone in the server X-Git-Tag: xonotic-v0.7.0~61^2~69 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04de42bdc92ab7359309bf284cac89e32b16ad58;p=xonotic%2Fxonotic-data.pk3dir.git Arena: centerprint "Waiting for players to join..." when alone in the server --- diff --git a/qcsrc/server/mutators/gamemode_arena.qc b/qcsrc/server/mutators/gamemode_arena.qc index 86f449a73..352f342f7 100644 --- a/qcsrc/server/mutators/gamemode_arena.qc +++ b/qcsrc/server/mutators/gamemode_arena.qc @@ -108,12 +108,30 @@ void Arena_AddChallengers() self = e; } +float prev_numspawned; float Arena_CheckPlayers() { + entity e; + Arena_AddChallengers(); if(numspawned >= 2) + { + if(prev_numspawned != -1) + { + FOR_EACH_REALCLIENT(e) + Send_CSQC_Centerprint_Generic_Expire(e, CPID_WAITING_PLAYERS); + } + prev_numspawned = -1; return 1; + } + + if(prev_numspawned != numspawned && numspawned == 1) + { + FOR_EACH_REALCLIENT(e) + Send_CSQC_Centerprint_Generic(e, CPID_WAITING_PLAYERS, "Waiting for players to join...", -1, 0); + prev_numspawned = numspawned; + } return 0; }