Fix cluster bomb target practice counting clusters as "shots" 0.9.25
authorWuzzy <Wuzzy2@mail.ru>
Wed, 05 Dec 2018 03:28:33 +0100
branch0.9.25
changeset 14386 a7769dbd7088
parent 14385 02841325495e
child 14387 2ab312c47dc3
Fix cluster bomb target practice counting clusters as "shots"
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Tue Dec 04 16:48:43 2018 +0100
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Wed Dec 05 03:28:33 2018 +0100
@@ -226,8 +226,10 @@
 	end
 
 	_G.onGearAdd = function(gear)
+		if GetGearType(gear) == params.gearType then
+			shots = shots + 1
+		end
 		if GetGearType(gear) == params.gearType or (params.secGearType and GetGearType(gear) == params.secGearType) then
-			shots = shots + 1
 			gearsInGameCount = gearsInGameCount + 1
 			gearsInGame[gear] = true
 		end