about summary refs log tree commit diff
path: root/src/game/editor
diff options
context:
space:
mode:
authorSushiTee <weichel.sascha@xxx.xx>2011-11-09 16:06:17 +0100
committeroy <Tom_Adams@web.de>2011-11-29 22:01:03 +0100
commit48d21b61a2a1b32ba0e39b411311947693ecea47 (patch)
treed1c3c045fa5ef566ccbbea6ba9aef498d81d5005 /src/game/editor
parent5dd2d189ada193841285d8c19ff998de9f1574d2 (diff)
downloadzcatch-48d21b61a2a1b32ba0e39b411311947693ecea47.tar.gz
zcatch-48d21b61a2a1b32ba0e39b411311947693ecea47.zip
fixed links between tile layer color envelopes when deleting envelopes
Diffstat (limited to 'src/game/editor')
-rw-r--r--src/game/editor/editor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp
index fe6e963c..75f9476c 100644
--- a/src/game/editor/editor.cpp
+++ b/src/game/editor/editor.cpp
@@ -3798,6 +3798,14 @@ void CEditorMap::DeleteEnvelope(int Index)
 						Layer->m_lQuads[k].m_ColorEnv--;
 				}
 			}
+			else if(m_lGroups[i]->m_lLayers[j]->m_Type == LAYERTYPE_TILES)
+			{
+				CLayerTiles *Layer = static_cast<CLayerTiles *>(m_lGroups[i]->m_lLayers[j]);
+				if(Layer->m_ColorEnv == Index)
+					Layer->m_ColorEnv = -1;
+				if(Layer->m_ColorEnv > Index)
+					Layer->m_ColorEnv--;
+			}
 
 	m_lEnvelopes.remove_index(Index);
 }