# HG changeset patch # User nemo # Date 1417381599 18000 # Node ID 2da35f88db23bd3f9202695bcaabc249a0661eed # Parent 9a9f0cbb10b242c9cf625eba885350731f75626f stricter skip diff -r 9a9f0cbb10b2 -r 2da35f88db23 share/hedgewars/Data/Maps/ClimbHome/map.lua --- a/share/hedgewars/Data/Maps/ClimbHome/map.lua Sun Nov 30 23:36:22 2014 +0300 +++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua Sun Nov 30 16:06:39 2014 -0500 @@ -32,6 +32,7 @@ local ready = false local showWaterStats = false -- uses the AI team to draw water height. local dummyHog = nil +local dummySkip = 0 function onGameInit() -- Ensure people get same map for same theme @@ -109,13 +110,17 @@ YouLost = false tauntNoo = false recordBroken = false - 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) - SetState(CurrentHedgehog,band(GetState(CurrentHedgehog),bnot(gstInvisible))) - SetWeapon(amRope) - ready = true + if CurrentHedgehog ~= nil then + if CurrentHedgehog ~= dummyHog then + SetGearPosition(CurrentHedgehog, 1951,32640) + if not HogsAreInvulnerable then SetEffect(CurrentHedgehog,heInvulnerable,0) end + AddVisualGear(19531,32640,vgtExplosion,0,false) + SetState(CurrentHedgehog,band(GetState(CurrentHedgehog),bnot(gstInvisible))) + SetWeapon(amRope) + ready = true + else + dummySkip = GameTime+1 + end end for f,i in pairs(Fire) do DeleteGear(f) @@ -171,8 +176,9 @@ function onGameTick20() local x,y; if math.random(20) == 1 then AddVisualGear(2012,56,vgtSmoke,0,false) end - if CurrentHedgehog == dummyHog then + if CurrentHedgehog == dummyHog and dummySkip ~= 0 and dummySkip < GameTime then ParseCommand("/skip") + dummySkip = 0 end --if BoomFire ~= nil then