Fix host not re-sending ammo scheme after editing an existing ammo scheme
This caused clients to start with an incompatible ammo loadout.
--- 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);