ASA fruit02: Delete sticky flames
authorWuzzy <Wuzzy2@mail.ru>
Fri, 31 May 2019 15:04:43 +0200
changeset 15105 5ff651c926ef
parent 15104 c942f65c09a6
child 15106 84bab72a0b7f
ASA fruit02: Delete sticky flames
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Fri May 31 13:21:43 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Fri May 31 15:04:43 2019 +0200
@@ -278,6 +278,13 @@
 	end
 end
 
+function onGearAdd(gear)
+	-- Delete sticky flames to reduce the waiting time after blowing up the barrels
+	if GetGearType(gear) == gtFlame and band(GetState(gear), gsttmpFlag) ~= 0 then
+		DeleteGear(gear)
+	end
+end
+
 function onGearDelete(gear)
 	if gear == hero.gear then
 		hero.dead = true