share/hedgewars/Data/Scripts/Animate.lua
changeset 12084 ccab0d396a7f
parent 9245 1dfdf35dd35d
child 12088 1da37e2ba6fd
equal deleted inserted replaced
12083:2780e8a10d4c 12084:ccab0d396a7f
   286 end
   286 end
   287 
   287 
   288 function Animate(steps)
   288 function Animate(steps)
   289   if skipping == true then
   289   if skipping == true then
   290     animPos = 1
   290     animPos = 1
       
   291     SetCinematicMode(false)
   291     SetInputMask(0xFFFFFFFF)
   292     SetInputMask(0xFFFFFFFF)
   292     SkipAnimation(steps)
   293     SkipAnimation(steps)
   293     return true
   294     return true
   294   end
   295   end
   295     
   296     
   297     return false
   298     return false
   298   end
   299   end
   299 
   300 
   300   if steps[animPos] == nil then
   301   if steps[animPos] == nil then
   301       animPos = 1
   302       animPos = 1
       
   303       SetCinematicMode(false)
   302       SetInputMask(0xFFFFFFFF)
   304       SetInputMask(0xFFFFFFFF)
   303       return true
   305       return true
   304   end
   306   end
   305   
   307   
   306   if steps[animPos].args[1] ~= CurrentHedgehog and steps[animPos].func ~= AnimWait 
   308   if steps[animPos].args[1] ~= CurrentHedgehog and steps[animPos].func ~= AnimWait 
   307     and (steps[animPos].swh == nil or steps[animPos].swh == true) then
   309     and (steps[animPos].swh == nil or steps[animPos].swh == true) then
   308       AnimSwitchHog(steps[animPos].args[1])
   310       AnimSwitchHog(steps[animPos].args[1])
   309   end
   311   end
   310 
   312 
   311   SetInputMask(bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLeft+gmLJump+gmRight+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon))
   313   SetInputMask(bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLeft+gmLJump+gmRight+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon))
       
   314   SetCinematicMode(true)
   312   retVal = steps[animPos].func(unpack(steps[animPos].args))
   315   retVal = steps[animPos].func(unpack(steps[animPos].args))
   313   if (retVal ~= false) then
   316   if (retVal ~= false) then
   314     animPos = animPos + 1
   317     animPos = animPos + 1
   315   end
   318   end
   316 
   319