ClimbHome, Sniper Rifle training: Unselect weapon after victory
authorWuzzy <Wuzzy2@mail.ru>
Wed, 07 Feb 2018 03:56:53 +0100
changeset 12913 20e627c1ac20
parent 12912 a840fd55caa6
child 12914 0de553fb7e89
ClimbHome, Sniper Rifle training: Unselect weapon after victory
share/hedgewars/Data/Maps/ClimbHome/map.lua
share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.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.
--- 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.