From b92210d4a0c943610759c2ceaeb3826e9c7e55d4 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 20 Mar 2016 08:40:55 +0800 Subject: [PATCH] No watching replay when split-screen And some bugs fixes --- data/gui/ghost_replay_info_dialog.stkgui | 2 +- src/race/race_manager.cpp | 1 + src/states_screens/dialogs/ghost_replay_info_dialog.cpp | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/data/gui/ghost_replay_info_dialog.stkgui b/data/gui/ghost_replay_info_dialog.stkgui index 0f6009f21..0a2e90f67 100644 --- a/data/gui/ghost_replay_info_dialog.stkgui +++ b/data/gui/ghost_replay_info_dialog.stkgui @@ -19,7 +19,7 @@
-
diff --git a/src/race/race_manager.cpp b/src/race/race_manager.cpp index 141d55573..5e97bc4f8 100644 --- a/src/race/race_manager.cpp +++ b/src/race/race_manager.cpp @@ -954,6 +954,7 @@ void RaceManager::startWatchingReplay(const std::string &track_ident, setMajorMode(RaceManager::MAJOR_MODE_SINGLE); setCoinTarget(0); m_num_karts = ReplayPlay::get()->getNumGhostKart(); + m_kart_status.clear(); Log::verbose("RaceManager", "%u ghost kart(s) for watching replay only\n", (unsigned int)m_num_karts); diff --git a/src/states_screens/dialogs/ghost_replay_info_dialog.cpp b/src/states_screens/dialogs/ghost_replay_info_dialog.cpp index 0bab44f40..6d9f74d18 100644 --- a/src/states_screens/dialogs/ghost_replay_info_dialog.cpp +++ b/src/states_screens/dialogs/ghost_replay_info_dialog.cpp @@ -47,6 +47,13 @@ GhostReplayInfoDialog::GhostReplayInfoDialog(unsigned int replay_id) m_record_widget = getWidget("record-race"); m_watch_widget = getWidget("watch-only"); + if (race_manager->getNumLocalPlayers() > 1) + { + // No watching replay when split-screen + m_watch_widget->setVisible(false); + getWidget("watch-only-text")->setVisible(false); + } + m_record_widget->setState(false); m_watch_widget->setState(false);