Speed Shoppa: Set hog dy=0 on victory
authorWuzzy <Wuzzy2@mail.ru>
Mon, 20 May 2019 14:59:26 +0200
changeset 15019 f877fbeaee6c
parent 15018 333154e90c5b
child 15020 a1165392c9db
Speed Shoppa: Set hog dy=0 on victory
share/hedgewars/Data/Scripts/SpeedShoppa.lua
--- a/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Mon May 20 01:24:25 2019 +0200
+++ b/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Mon May 20 14:59:26 2019 +0200
@@ -159,8 +159,8 @@
 				SaveMissionVar("Won", "true")
 				PlaySound(sndVictory, playerHog)
 				SetEffect(playerHog, heInvulnerable, 1)
-				SetState(playerHog, bor(GetState(playerHog), gstWinner))
-				SetState(playerHog, band(GetState(playerHog), bnot(gstHHDriven)))
+				local dx, dy = GetGearVelocity(playerHog)
+				SetGearVelocity(playerHog, 0, dy)
 				AddCaption(loc("Challenge completed!"))
 				SendStat(siGameResult, loc("Challenge completed!"))
 				SendStat(siPointType, "!TIME")