From 370bdca6fdfbd671ae491673c8e67cdf5252d6a8 Mon Sep 17 00:00:00 2001 From: codeimp Date: Fri, 20 Feb 2009 12:29:37 +0000 Subject: [PATCH] @ work in progress, may not compile --- Source/Map/MapSet.cs | 5 +++++ Source/Map/Sidedef.cs | 4 ++++ 2 files changed, 9 insertions(+) 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