QTfrontend/selectWeapon.cpp
changeset 2467 be6690c337fb
parent 2377 f3fab2b09e0c
child 2471 1cfc9f897616
--- a/QTfrontend/selectWeapon.cpp	Thu Oct 15 19:31:53 2009 +0000
+++ b/QTfrontend/selectWeapon.cpp	Thu Oct 15 19:38:18 2009 +0000
@@ -29,11 +29,14 @@
 #include <QSettings>
 #include <QMessageBox>
 #include <QTabWidget>
+#include <math.h>
 
 QImage getAmmoImage(int num)
 {
 	static QImage ammo(":Ammos.png");
-	return ammo.copy(0, num*32, 32, 32);
+    int x = floor((num * 32) / ammo.height()) * 32;
+    if(x) x--;
+	return ammo.copy(x, num*32, 32, 32);
 }
 
 SelWeaponItem::SelWeaponItem(bool allowInfinite, int iconNum, int wNum, QWidget* parent) :