QTfrontend/newnetclient.cpp
changeset 1797 fedd8649fdd9
parent 1793 3e8caf5fee58
child 1800 f1df2eb32a16
--- a/QTfrontend/newnetclient.cpp	Sat Feb 14 21:04:51 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Sun Feb 15 14:38:02 2009 +0000
@@ -497,6 +497,10 @@
 			emit ammoChanged(lst[3], lst[2]);
 			return;
 		}
+		if (lst[1] == "TEMPLATE_FILTER") {
+			emit templateFilterChanged(lst[2].toUInt());
+			return;
+		}
 		qWarning() << "Net: Unknown 'CONFIG_PARAM' message:" << lst;
 		return;
 	}
@@ -575,6 +579,7 @@
 			m_pGameCFGWidget->WeaponsName->currentIndex()
 			).toString();
 	onWeaponsNameChanged(name, ammo);
+	onTemplateFilterChanged(m_pGameCFGWidget->getTemplateFilter());
 }
 
 void HWNewNet::RunGame()
@@ -660,6 +665,11 @@
 	if (isChief) RawSendNet(QString("CONFIG_PARAM%1AMMO%1%2%1%3").arg(delimeter).arg(ammo).arg(name));
 }
 
+void HWNewNet::onTemplateFilterChanged(int filter)
+{
+	if (isChief) RawSendNet(QString("CONFIG_PARAM%1TEMPLATE_FILTER%1%2").arg(delimeter).arg(filter));
+}
+
 void HWNewNet::chatLineToNet(const QString& str)
 {
 	if(str != "") {