From: terencehill Date: Wed, 24 Aug 2016 22:46:43 +0000 (+0200) Subject: Infer teamplay from gametype instead of checking serverflags & SERVERFLAG_TEAMPLAY... X-Git-Tag: xonotic-v0.8.2~671 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7c6e789970aa8e825df2a95143cdaa62e5c3bbd8;p=xonotic%2Fxonotic-data.pk3dir.git Infer teamplay from gametype instead of checking serverflags & SERVERFLAG_TEAMPLAY (it allows to get rid of an additional Scoreboard_InitScores(); call on connection) --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 7de294681..9bcfd4e7a 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -944,6 +944,7 @@ NET_HANDLE(ENT_CLIENT_SCORES_INFO, bool isnew) { make_pure(this); gametype = ReadRegistered(Gametypes); + teamplay = _MapInfo_GetTeamPlayBool(gametype); HUD_ModIcons_SetFunc(); FOREACH(Scores, true, { if (scores_label(it)) strunzone(scores_label(it)); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index b013a8e17..7780c522d 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1784,13 +1784,6 @@ void CSQC_UpdateView(entity this, float w, float h) switchweapon = Weapons_from(STAT(SWITCHWEAPON)); - f = (serverflags & SERVERFLAG_TEAMPLAY); - if(f != teamplay) - { - teamplay = f; - Scoreboard_InitScores(); - } - if(last_switchweapon != switchweapon) { weapontime = time;