Fix bee target practice removing target selection after first shot
authorWuzzy <Wuzzy2@mail.ru>
Tue, 07 Aug 2018 01:52:40 +0200
changeset 13628 f66d8779e4dd
parent 13627 358ccb060cb3
child 13629 6a06904c7bb8
Fix bee target practice removing target selection after first shot
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Tue Aug 07 01:47:49 2018 +0200
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Tue Aug 07 01:52:40 2018 +0200
@@ -139,7 +139,13 @@
 	_G.onGameInit = function()
 		Seed = 1
 		ClearGameFlags()
-		EnableGameFlags(gfDisableWind, gfMultiWeapon, gfOneClanMode, solid, artillery)
+		local attackMode
+		if (params.ammoType == amBee) then
+			attackMode = gfInfAttack
+		else
+			attackMode = gfMultiWeapon
+		end
+		EnableGameFlags(gfDisableWind, attackMode, gfOneClanMode, solid, artillery)
 		TurnTime = params.time
 		Map = params.map
 		Theme = params.theme