# HG changeset patch # User Wuzzy # Date 1559317226 -7200 # Node ID 9f237442574442dd78a0d8cef0dc5136448c3950 # Parent 84bab72a0b7fe2b5d394497f3b5d7abcbe172995 ASA fruit02: Use pre-selected barrel positions and fewer barrels This should fix some extreme lag issues in this mission due to excessive flame spawns diff -r 84bab72a0b7f -r 9f2374425744 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Fri May 31 15:20:03 2019 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua Fri May 31 17:40:26 2019 +0200 @@ -14,6 +14,7 @@ local tookPartInBattle = false local previousHog = -1 local permitCaptainLimeDeath = false +local fixedWind = false -- dialogs local dialog01 = {} local dialog02 = {} @@ -179,19 +180,47 @@ local x2 = 1306 local y1 = 1210 local y2 = 1620 - while true do - if y2 1350 then - SetWind(-40) + if (not fixedWind) and CurrentHedgehog and GetY(CurrentHedgehog) > 1350 then + fixedWind = true + wind() end end function onGearAdd(gear) - -- Delete sticky flames to reduce the waiting time after blowing up the barrels + -- Turn sticky flames to normal flames, to reduce the waiting time after blowing up the barrels if GetGearType(gear) == gtFlame and band(GetState(gear), gsttmpFlag) ~= 0 then - DeleteGear(gear) + SetState(gear, band(GetState(gear), bnot(gsttmpFlag))) end end @@ -603,6 +633,10 @@ end function wind() - SetWind(GetRandom(201)-100) + if fixedWind then + SetWind(10) + else + SetWind(GetRandom(201)-100) + end end