diff --git a/Source/Map/MapSet.cs b/Source/Map/MapSet.cs index 008c6aa2..85c02095 100644 --- a/Source/Map/MapSet.cs +++ b/Source/Map/MapSet.cs @@ -575,6 +575,11 @@ namespace CodeImp.DoomBuilder.Map MemoryStream stream = new MemoryStream(512000); SerializerStream serializer = new SerializerStream(stream); + // Index the sidedefs + int sidedefindex = 0; + foreach(Sidedef sd in sidedefs) + sd.SerializedIndex = sidedefindex++; + // Write private data serializer.wInt(lastsectorindex); serializer.wInt(indexholes.Count); diff --git a/Source/Map/Sidedef.cs b/Source/Map/Sidedef.cs index 032d1078..52272d1d 100644 --- a/Source/Map/Sidedef.cs +++ b/Source/Map/Sidedef.cs @@ -59,6 +59,9 @@ namespace CodeImp.DoomBuilder.Map private long longtexnamemid; private long longtexnamelow; + // Clone + private int serializedindex; + #endregion #region ================== Properties @@ -77,6 +80,7 @@ namespace CodeImp.DoomBuilder.Map public long LongHighTexture { get { return longtexnamehigh; } } public long LongMiddleTexture { get { return longtexnamemid; } } public long LongLowTexture { get { return longtexnamelow; } } + internal int SerializedIndex { get { return serializedindex; } set { serializedindex = value; } } #endregion