a7769dbd7088
authorDebian Games Team <pkg-games-devel@lists.alioth.debian.org>
Fri, 4 Jan 2019 20:07:05 +0000 (20:07 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Fri, 4 Jan 2019 20:07:05 +0000 (20:07 +0000)
# HG changeset patch
# User Wuzzy <Wuzzy2@mail.ru>
# Date 1543976913 -3600
# Node ID a7769dbd7088504c11673d2d7b1e258838c3ce01
# Parent  02841325495e2f08fa23919f635bf9ad9010cb7f
Fix cluster bomb target practice counting clusters as "shots"

Gbp-Pq: Name a7769dbd7088.patch

share/hedgewars/Data/Scripts/TargetPractice.lua

index 320aae9b82c14ee9f1e9b1a1f33ff2531fccf03a..5af042078c62bcb0a3a8889f14b207daff61564a 100644 (file)
@@ -226,8 +226,10 @@ function TargetPracticeMission(params)
        end
 
        _G.onGearAdd = function(gear)
-               if GetGearType(gear) == params.gearType or (params.secGearType and GetGearType(gear) == params.secGearType) then
+               if GetGearType(gear) == params.gearType then
                        shots = shots + 1
+               end
+               if GetGearType(gear) == params.gearType or (params.secGearType and GetGearType(gear) == params.secGearType) then
                        gearsInGameCount = gearsInGameCount + 1
                        gearsInGame[gear] = true
                end