Teamwork: Play sound for time bonus, don't give time bonus for destroying crate
authorWuzzy <Wuzzy2@mail.ru>
Mon, 19 Nov 2018 18:18:06 +0100
changeset 14240 c94905a5109c
parent 14239 748c611bee79
child 14241 bf627790da14
Teamwork: Play sound for time bonus, don't give time bonus for destroying crate
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua	Mon Nov 19 17:56:49 2018 +0100
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua	Mon Nov 19 18:18:06 2018 +0100
@@ -87,8 +87,9 @@
 		HogSay(CurrentHedgehog, loc("Hmmm..."), SAY_THINK)
 	end
 
-	if GetGearType(gear) == gtCase then
+	if (GetGearType(gear) == gtCase) and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
 		SetTurnTimeLeft(TurnTimeLeft + 5000)
+		PlaySound(sndExtraTime)
 	end
 	-- Note: The victory sequence is done automatically by Hedgewars
 	if  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then