HedgeEditor: Use default clan color in AddTeam in mission export
authorWuzzy <Wuzzy2@mail.ru>
Wed, 01 Aug 2018 18:17:10 +0200
changeset 13590 72515cd20984
parent 13589 53ca3a22da45
child 13591 41e0446fb254
HedgeEditor: Use default clan color in AddTeam in mission export
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Aug 01 17:30:13 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Wed Aug 01 18:17:10 2018 +0200
@@ -1487,10 +1487,9 @@
 			teamCounter = 1
 		end
 
-		-- Convert color to string
-		local rgba = GetClanColor(GetHogClan(gear))
-		local rgb = div(band(rgba, 0xFFFFFF00), 0x100)
-		local tColor = string.format("0x%X", rgb)
+		-- Color argument for AddTeam; using the
+		-- default clan color format.
+		local tColor = -(GetHogClan(gear)+1)
 
 		local tFort, tGrave, tFlag, tVoice
 		if getGearValue(gear,"grave") == nil then