share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
changeset 13748 d7b72ea8d136
parent 13745 2bb7141496a9
child 13753 d09366ca4d7b
--- a/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Sun Sep 02 22:05:45 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua	Mon Sep 03 00:03:06 2018 +0200
@@ -53,9 +53,11 @@
 	-- Set attacked state to prevent “Boring” sound to be played
 	SetState(CurrentHedgehog, bor(GetState(CurrentHedgehog), gstAttacked))
 	--set escape time
-	SetTurnTimeLeft(GetAwayTime*10*seconds)
-	if TurnTimeLeft > 0 then
-		Retreat(TurnTimeLeft, false)
+	local escapeTime = GetAwayTime*10*seconds
+	if escapeTime > 0 then
+		Retreat(escapeTime, false)
+	else
+		SetTurnTimeLeft(escapeTime)
 	end
  end