parent
75b7244f05
commit
34cf058b02
@ -31,10 +31,7 @@ cChunkStay::~cChunkStay()
|
||||
|
||||
void cChunkStay::Clear(void)
|
||||
{
|
||||
if (m_ChunkMap != NULL)
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
ASSERT(m_ChunkMap == NULL);
|
||||
m_Chunks.clear();
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,12 @@ class cChunkStay
|
||||
{
|
||||
public:
|
||||
cChunkStay(void);
|
||||
|
||||
/** Deletes the object. Note that this calls Clear(), which means that the ChunkStay needs to be disabled. */
|
||||
virtual ~cChunkStay();
|
||||
|
||||
/** Clears all the chunks that have been added.
|
||||
To be used only while the ChunkStay object is not enabled. */
|
||||
void Clear(void);
|
||||
|
||||
/** Adds a chunk to be locked from unloading.
|
||||
|
@ -286,6 +286,7 @@ void cLightingThread::LightChunk(cLightingChunkStay & a_Item)
|
||||
{
|
||||
a_Item.m_CallbackAfter->Call(a_Item.m_ChunkX, a_Item.m_ChunkZ);
|
||||
}
|
||||
a_Item.Disable();
|
||||
delete &a_Item;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user