Fix host not re-sending ammo scheme after editing an existing ammo scheme
authorWuzzy <Wuzzy2@mail.ru>
Tue, 31 Oct 2017 18:30:53 +0100
changeset 12811 de3cbbb09915
parent 12810 28e8f1d76b06
child 12812 59cb9bd8331c
Fix host not re-sending ammo scheme after editing an existing ammo scheme This caused clients to start with an incompatible ammo loadout.
QTfrontend/hwform.cpp
QTfrontend/ui/widget/gamecfgwidget.cpp
QTfrontend/ui/widget/gamecfgwidget.h
--- a/QTfrontend/hwform.cpp	Tue Oct 31 17:07:56 2017 +0100
+++ b/QTfrontend/hwform.cpp	Tue Oct 31 18:30:53 2017 +0100
@@ -339,6 +339,8 @@
              this, SLOT(AddWeapons(QString, QString)));
     connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsEdited(QString, QString, QString)),
              this, SLOT(EditWeapons(QString, QString, QString)));
+    connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsEdited(QString, QString, QString)),
+             ui.pageNetGame->pGameCFG, SLOT(resendAmmoData()));
 
     connect(ui.pageMain->BtnNetLocal, SIGNAL(clicked()), this, SLOT(GoToNet()));
     connect(ui.pageMain->BtnNetOfficial, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Tue Oct 31 17:07:56 2017 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Tue Oct 31 18:30:53 2017 +0100
@@ -695,6 +695,11 @@
     schemeChanged(GameSchemes->currentIndex());
 }
 
+void GameCFGWidget::resendAmmoData()
+{
+    ammoChanged(WeaponsName->currentIndex());
+}
+
 void GameCFGWidget::onDrawnMapChanged(const QByteArray & data)
 {
     emit paramChanged("DRAWNMAP", QStringList(qCompress(data, 9).toBase64()));
--- a/QTfrontend/ui/widget/gamecfgwidget.h	Tue Oct 31 17:07:56 2017 +0100
+++ b/QTfrontend/ui/widget/gamecfgwidget.h	Tue Oct 31 18:30:53 2017 +0100
@@ -55,6 +55,7 @@
         void setParam(const QString & param, const QStringList & value);
         void fullNetConfig();
         void resendSchemeData();
+        void resendAmmoData();
         void setMaster(bool master);
         void setTabbed(bool tabbed);