From 7c6e789970aa8e825df2a95143cdaa62e5c3bbd8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 25 Aug 2016 00:46:43 +0200 Subject: [PATCH] Infer teamplay from gametype instead of checking serverflags & SERVERFLAG_TEAMPLAY (it allows to get rid of an additional Scoreboard_InitScores(); call on connection) --- qcsrc/client/main.qc | 1 + qcsrc/client/view.qc | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) 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; -- 2.39.2