Don't send empty ammo scheme to server when changing ammo schemes in room (fixes 'bad state' server message)
authorunc0rr
Sat, 10 Jan 2009 12:02:58 +0000
changeset 1628 4939254196d6
parent 1627 efcf6e976869
child 1629 9f12da88d769
Don't send empty ammo scheme to server when changing ammo schemes in room (fixes 'bad state' server message)
QTfrontend/gamecfgwidget.cpp
--- a/QTfrontend/gamecfgwidget.cpp	Fri Jan 09 17:56:53 2009 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Sat Jan 10 12:02:58 2009 +0000
@@ -197,5 +197,6 @@
 
 void GameCFGWidget::ammoChanged(int index)
 {
-	emit newWeaponScheme(WeaponsName->itemText(index), WeaponsName->itemData(index).toString());
+	if (index >= 0)
+		emit newWeaponScheme(WeaponsName->itemText(index), WeaponsName->itemData(index).toString());
 }