- Timestamp:
- Sep 12, 2014, 11:14:11 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/MapRendering/MapRendering.cs
r187 r189 55 55 try { 56 56 if (!Instance.renderingFullMap) { 57 Monitor.Enter (Instance.zoomLevelBuffers); 58 try { 57 lock (Instance.zoomLevelBuffers) { 59 58 Chunk c = (Chunk)o; 60 59 Vector3i cPos = c.GetWorldPos (); … … 72 71 Instance.chunkSaveTimer.Start (); 73 72 } 74 } finally {75 Monitor.Exit (Instance.zoomLevelBuffers);76 73 } 77 74 } … … 103 100 ); 104 101 105 Monitor.Enter (Instance.zoomLevelBuffers); 106 try { 102 lock (Instance.zoomLevelBuffers) { 107 103 for (int i = 0; i < Constants.ZOOMLEVELS; i++) { 108 104 zoomLevelBuffers [i].ResetBlock (); … … 152 148 Log.Out (String.Format ("RenderMap: {0}/{1} ({2}%)", curFullMapPos.x, widthPix, (int)((float)curFullMapPos.x / widthPix * 100))); 153 149 } 154 } finally {155 Monitor.Exit (Instance.zoomLevelBuffers);156 150 } 157 151 … … 178 172 private void TimedRendering (object source, System.Timers.ElapsedEventArgs e) 179 173 { 180 Monitor.Enter (zoomLevelBuffers); 181 try { 174 lock (zoomLevelBuffers) { 182 175 RenderDirtyChunks (); 183 176 if (dirtyChunks.Count > 0) 184 177 Instance.chunkSaveTimer.Start (); 185 } finally {186 Monitor.Exit (zoomLevelBuffers);187 178 } 188 179 }
Note:
See TracChangeset
for help on using the changeset viewer.