HedgeEditor: Fix air mines timer being falsely exported and displayed
authorWuzzy <almikes@aol.com>
Wed, 23 Nov 2016 18:33:14 +0100
changeset 12049 75f56c1198c3
parent 12048 76285ad6fa7f
child 12050 f71e34babe8c
HedgeEditor: Fix air mines timer being falsely exported and displayed
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Nov 23 18:00:35 2016 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Nov 23 18:33:14 2016 +0100
@@ -1193,6 +1193,7 @@
 	elseif cat[cIndex] == loc("Air Mine Placement Mode") then
 		gear = AddGear(x, y, gtAirMine, 0, 0, 0, 0)
 		SetTimer(gear, pMode[pIndex])
+		SetGearValues(gear, nil, nil, pMode[pIndex])
 	elseif cat[cIndex] == loc("Repositioning Mode") then
 
 		if pMode[pIndex] == loc("Selection Mode") then
@@ -1706,6 +1707,7 @@
 				GetY(gear) .. ", gtAirMine, 0, 0, 0, 0)"
 			table.insert(airMineList, temp)
 			table.insert(airMineList, "	SetTimer(tempG, " .. GetTimer(gear) .. ")")
+			table.insert(airMineList, "	SetGearValues(tempG, nil, nil, " .. GetTimer(gear) .. ")")
 			table.insert(airMineList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
 		else
 
@@ -1714,6 +1716,7 @@
 				GetY(gear) .. ", gtAirMine, 0, 0, 0, 0)" .. ", " ..
 				GetTimer(gear) ..")"
 			table.insert(airMineList, temp)
+			table.insert(airMineList, "	SetGearValues(tempG, nil, nil, " .. GetTimer(gear) .. ")")
 
 		end