File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,7 @@ cChunkStay::~cChunkStay()
31
31
32
32
void cChunkStay::Clear (void )
33
33
{
34
- if (m_ChunkMap != NULL )
35
- {
36
- Disable ();
37
- }
34
+ ASSERT (m_ChunkMap == NULL );
38
35
m_Chunks.clear ();
39
36
}
40
37
Original file line number Diff line number Diff line change @@ -36,8 +36,12 @@ class cChunkStay
36
36
{
37
37
public:
38
38
cChunkStay (void );
39
+
40
+ /* * Deletes the object. Note that this calls Clear(), which means that the ChunkStay needs to be disabled. */
39
41
virtual ~cChunkStay ();
40
42
43
+ /* * Clears all the chunks that have been added.
44
+ To be used only while the ChunkStay object is not enabled. */
41
45
void Clear (void );
42
46
43
47
/* * Adds a chunk to be locked from unloading.
Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ void cLightingThread::LightChunk(cLightingChunkStay & a_Item)
286
286
{
287
287
a_Item.m_CallbackAfter ->Call (a_Item.m_ChunkX , a_Item.m_ChunkZ );
288
288
}
289
+ a_Item.Disable ();
289
290
delete &a_Item;
290
291
}
291
292
You can’t perform that action at this time.
0 commit comments