diff --git a/src/game/client/mapbase/c_tf_lesson.cpp b/src/game/client/mapbase/c_tf_lesson.cpp index 707be43e01c..fcd60f85921 100644 --- a/src/game/client/mapbase/c_tf_lesson.cpp +++ b/src/game/client/mapbase/c_tf_lesson.cpp @@ -12,6 +12,7 @@ #include "tf_hud_training.h" #include "tf_hud_objectivestatus.h" #include "tf_hud_notification_panel.h" +#include "tf_hud_statpanel.h" //----------------------------------------------------------------------------- @@ -636,6 +637,13 @@ void CTFObjectiveLesson::Start() TFGameRules()->SetShowingTFObjectiveLesson( true ); + // Hide the stat panel if it's active + CTFStatPanel *pStatPanel = GET_HUDELEMENT( CTFStatPanel ); + if ( pStatPanel ) + { + pStatPanel->Hide(); + } + // HACKHACK: Can't put these in Init() due to base class usage m_bNoIconTarget = true; m_bAllowNodrawTarget = true; diff --git a/src/game/client/tf/tf_hud_statpanel.cpp b/src/game/client/tf/tf_hud_statpanel.cpp index 4b5d7ea7852..c6a35ffca67 100644 --- a/src/game/client/tf/tf_hud_statpanel.cpp +++ b/src/game/client/tf/tf_hud_statpanel.cpp @@ -712,6 +712,12 @@ void CTFStatPanel::ShowStatPanel( int iClass, int iTeam, int iCurStatValue, TFSt return; } +#ifdef MAPBASE + // Don't interfere with training HUD + if ( TFGameRules() && TFGameRules()->IsShowingTFObjectiveLesson() ) + return; +#endif + ClassStats_t &classStats = GetClassStats( iClass ); vgui::Label *pLabel = dynamic_cast