Racer: Make winners invulnerable
authorWuzzy <Wuzzy2@mail.ru>
Sun, 15 Sep 2019 15:12:48 +0200
changeset 15405 06524f2e9a74
parent 15404 4b792051c159
child 15406 bf49f26b1fa9
Racer: Make winners invulnerable
share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Sun Sep 15 15:06:01 2019 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua	Sun Sep 15 15:12:48 2019 +0200
@@ -525,6 +525,8 @@
 			if GetHogClan(hhs[i]) ~= bestClan or roundDraw then
 				SetEffect(hhs[i], heResurrectable, 0)
 				SetHealth(hhs[i],0)
+			elseif not roundDraw then
+				SetEffect(hhs[i], heInvulnerable, 1)
 			end
 		end
 
@@ -948,6 +950,7 @@
 
                                 if (CheckWaypoints() == true) then
                                         AdjustScores()
+                                        SetEffect(CurrentHedgehog, heInvulnerable, 1)
                                         DisableTumbler()
                                 end