Disable hog control after winning target practice challenge
authorWuzzy <Wuzzy2@mail.ru>
Fri, 27 Oct 2017 00:12:38 +0200
changeset 12785 659ab77b52c0
parent 12784 1f8a62d1609d
child 12786 9892d596693e
Disable hog control after winning target practice challenge
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Thu Oct 26 22:49:39 2017 +0200
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Fri Oct 27 00:12:38 2017 +0200
@@ -215,6 +215,9 @@
 					PlaySound(sndVictory, player)
 					SetState(player, bor(GetState(player), gstWinner))
 					time_goal = TurnTimeLeft
+					-- Disable control
+					SetInputMask(0)
+					AddAmmo(player, params.ammoType, 0)
 				end
 			end
 		end