# HG changeset patch # User Wuzzy # Date 1493909374 -7200 # Node ID 8cc070640fd1f4affb3c5dd5652b4d75a075c200 # Parent cd53f1bf52ffb007dadc2f425dde9b875d637931 Fix skipping in Racer causing the next team to be skipped, too diff -r cd53f1bf52ff -r 8cc070640fd1 share/hedgewars/Data/Scripts/Multiplayer/Racer.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Thu May 04 16:36:39 2017 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Thu May 04 16:49:34 2017 +0200 @@ -160,6 +160,7 @@ local roundN local lastRound local RoundHasChanged +local turnSkipped = false local boostX = 0 local boostY = 0 @@ -570,11 +571,11 @@ 4, 4000) end -function InstructionsRace(time) +function InstructionsRace() ShowMission(loc("Racer"), loc("A Hedgewars mini-game"), loc("Touch all waypoints as fast as you can!"), - 2, time) + 2, 4000) end function onGameStart() @@ -680,6 +681,7 @@ TryRepositionHogs() racerActive = false + turnSkipped = false trackTime = 0 @@ -820,7 +822,7 @@ end -- if the player has expended his tunbling time, stop him tumbling - if TurnTimeLeft <= 20 then + if TurnTimeLeft <= 20 and not turnSkipped then DisableTumbler() end @@ -868,6 +870,12 @@ usedWeapons[at] = 0 end +function onHogAttack(ammoType) + if ammoType == amSkip then + turnSkipped = true + end +end + function onAchievementsDeclaration() usedWeapons[amSkip] = nil usedWeapons[amExtraTime] = nil