# HG changeset patch
# User Wuzzy <Wuzzy2@mail.ru>
# Date 1517972213 -3600
# Node ID 20e627c1ac2019624840a2cf4bb6ebc00577b00d
# Parent  a840fd55caa6a922655c46affe72e30fe2c20b23
ClimbHome, Sniper Rifle training: Unselect weapon after victory

diff -r a840fd55caa6 -r 20e627c1ac20 share/hedgewars/Data/Maps/ClimbHome/map.lua
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Wed Feb 07 03:50:38 2018 +0100
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Wed Feb 07 03:56:53 2018 +0100
@@ -449,8 +449,7 @@
                 SendStat(siCustomAchievement, string.format(loc("%s (%s) reached home in %.3f seconds."), GetHogName(CurrentHedgehog), GetHogTeamName(CurrentHedgehog), finishTime))
                 makeMultiPlayerWinnerStat(CurrentHedgehog)
                 PlaySound(sndVictory, CurrentHedgehog)
-                -- TODO: Unselect weapon.
-                -- Note: SetWeapon(amNothing) does not work. :-(
+		SetWeapon(amNothing)
                 SetGearMessage(CurrentHedgehog, band(GetGearMessage(CurrentHedgehog), bnot(gmLeft+gmRight+gmUp+gmDown+gmHJump+gmLJump+gmPrecise)))
                 SetInputMask(0x00)
                 -- TODO: Add stupid winner grin.
diff -r a840fd55caa6 -r 20e627c1ac20 share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua
--- a/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Wed Feb 07 03:50:38 2018 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Wed Feb 07 03:56:53 2018 +0100
@@ -381,8 +381,9 @@
 			PlaySound(sndVictory, CurrentHedgehog)
 			FollowGear(CurrentHedgehog)
 
-			-- Disable hog controls
+			-- Unselect sniper rifle and disable hog controls
 			SetInputMask(0)
+			SetWeapon(amNothing)
 			AddAmmo(CurrentHedgehog, amSniperRifle, 0)
 
 			-- Save the time left so we may keep it.