Fixed a bug where, after finishing a campaign mission, the user needed to reselect the team in the frontend in order to see the next mission.
--- a/QTfrontend/game.cpp Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/game.cpp Tue Jun 26 00:57:09 2012 +0300
@@ -416,6 +416,10 @@
{
gameState = state;
emit GameStateChanged(state);
+ if (gameType == gtCampaign)
+ {
+ emit CampStateChanged(1);
+ }
}
void HWGame::abort()
--- a/QTfrontend/game.h Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/game.h Tue Jun 26 00:57:09 2012 +0300
@@ -72,6 +72,7 @@
void GameStats(char type, const QString & info);
void HaveRecord(bool isDemo, const QByteArray & record);
void ErrorMessage(const QString &);
+ void CampStateChanged(int);
public slots:
void FromNet(const QByteArray & msg);
--- a/QTfrontend/hwform.cpp Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/hwform.cpp Tue Jun 26 00:57:09 2012 +0300
@@ -1357,6 +1357,7 @@
void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo)
{
game = new HWGame(config, gamecfg, ammo, pTeamSelWidget);
+ connect(game, SIGNAL(CampStateChanged(int)), this, SLOT(UpdateCampaignPage(int)));
connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &)));
connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);