delay cake boom until it has walked a little bit. also fix accidental drowning of watergods in last commit
authornemo
Sun, 30 Nov 2014 15:12:59 -0500
changeset 10587 1dac23b5fe3b
parent 10586 dbb77726f0c6
child 10588 6189bb1c903d
delay cake boom until it has walked a little bit. also fix accidental drowning of watergods in last commit
share/hedgewars/Data/Maps/ClimbHome/map.lua
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Sun Nov 30 15:07:01 2014 -0500
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Sun Nov 30 15:12:59 2014 -0500
@@ -109,7 +109,7 @@
     YouLost = false
     tauntNoo = false
     recordBroken = false
-    if CurrentHedgehog ~= nil then
+    if CurrentHedgehog ~= nil and CurrentHedgehog ~= dummyHog then
         SetGearPosition(CurrentHedgehog, 1951,32640)
         if not HogsAreInvulnerable then SetEffect(CurrentHedgehog,heInvulnerable,0) end
         AddVisualGear(19531,32640,vgtExplosion,0,false)
@@ -201,7 +201,8 @@
             DeleteGear(Cake)
             Cake = nil
         end
-        if gearIsInCircle(CurrentHedgehog,cx,cy,450) then
+
+        if GetHealth(Cake) < 999990 and gearIsInCircle(CurrentHedgehog,cx,cy,450) then
             FireBoom(cx,cy,200) -- todo animate
             DeleteGear(Cake)
             Cake = nil