CS: Remove hog switch arrows on continent phase if switching gameflag is used
authorWuzzy <Wuzzy@disroot.org>
Wed, 28 Jun 2023 17:06:22 +0200
changeset 15966 605697b8947a
parent 15965 634d017650dc
child 15967 f362e82cddcf
CS: Remove hog switch arrows on continent phase if switching gameflag is used
share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Wed Jun 28 12:46:04 2023 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Wed Jun 28 17:06:22 2023 +0200
@@ -2142,7 +2142,11 @@
 		CS.PARACHUTE_IS_ON=1
 	elseif(GetGearType(gearUid)==gtSwitcher)
 	then
-		CS.SWITCH_HOG_IS_ON=true
+		if not CS.GAME_STARTED then
+			DeleteGear(gearUid)
+		else
+			CS.SWITCH_HOG_IS_ON=true
+		end
 	end
 end