Fix the bug
authorunc0rr
Thu, 09 Oct 2008 20:36:53 +0000
changeset 1339 8a11157c6c81
parent 1338 758c39a3dcfe
child 1340 430d210d54ae
Fix the bug
QTfrontend/hwform.cpp
QTfrontend/newnetclient.cpp
QTfrontend/newnetclient.h
--- a/QTfrontend/hwform.cpp	Thu Oct 09 17:28:22 2008 +0000
+++ b/QTfrontend/hwform.cpp	Thu Oct 09 20:36:53 2008 +0000
@@ -685,11 +685,12 @@
 void HWForm::CreateNetGame()
 {
 	QString ammo;
-	if (pnetserver) {
-	  ammo=ui.pageSelectWeapon->pWeapons->getWeaponsString(ui.pageNetGame->pGameCFG->WeaponsName->currentText());
+	if (hwnet->isRoomChief()) {
+		ammo = ui.pageSelectWeapon->pWeapons->getWeaponsString(ui.pageNetGame->pGameCFG->WeaponsName->currentText());
 	} else {
-	  ammo=ui.pageNetGame->pGameCFG->getNetAmmo();
+		ammo = ui.pageNetGame->pGameCFG->getNetAmmo();
 	}
+	
 	CreateGame(ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget, ammo);
 
 	connect(game, SIGNAL(SendNet(const QByteArray &)), hwnet, SLOT(SendNet(const QByteArray &)));
--- a/QTfrontend/newnetclient.cpp	Thu Oct 09 17:28:22 2008 +0000
+++ b/QTfrontend/newnetclient.cpp	Thu Oct 09 20:36:53 2008 +0000
@@ -486,3 +486,8 @@
 	}
 	RawSendNet(QString("LIST"));
 }
+
+bool HWNewNet::isRoomChief()
+{
+	return isChief;
+}
--- a/QTfrontend/newnetclient.h	Thu Oct 09 17:28:22 2008 +0000
+++ b/QTfrontend/newnetclient.h	Thu Oct 09 20:36:53 2008 +0000
@@ -42,6 +42,7 @@
   void Connect(const QString & hostName, quint16 port, const QString & nick);
   void Disconnect();
   void Ready();
+  bool isRoomChief();
 
  private:
   GameUIConfig* config;