Finalize ammo store fix
authorunc0rr
Sat, 06 Dec 2008 11:53:50 +0000
changeset 1541 61b3b32aede8
parent 1540 adcf8c366c79
child 1542 b755ddb0bae8
Finalize ammo store fix
QTfrontend/newnetclient.cpp
--- a/QTfrontend/newnetclient.cpp	Fri Dec 05 21:40:23 2008 +0000
+++ b/QTfrontend/newnetclient.cpp	Sat Dec 06 11:53:50 2008 +0000
@@ -481,7 +481,11 @@
 	onTeamsDivideChanged(m_pGameCFGWidget->getGameFlags() & 0x10);
 	onSolidChanged(m_pGameCFGWidget->getGameFlags() & 0x04);
 	// always initialize with default ammo (also avoiding complicated cross-class dependencies)
-	onWeaponsNameChanged("Default", cDefaultAmmoStore->mid(10));
+	QString name = m_pGameCFGWidget->WeaponsName->currentText();
+	QString ammo = m_pGameCFGWidget->WeaponsName->itemData(
+			m_pGameCFGWidget->WeaponsName->currentIndex()
+			).toString();
+	onWeaponsNameChanged(name, ammo);
 }
 
 void HWNewNet::RunGame()