1
0

Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().

This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
This commit is contained in:
madmaxoft
2014-02-10 22:47:10 +01:00
parent 589a4839df
commit 9cebc9157c
9 changed files with 213 additions and 87 deletions

View File

@@ -548,9 +548,21 @@ cLightingThread::cLightingChunkStay::cLightingChunkStay(cLightingThread & a_Ligh
void cLightingThread::cLightingChunkStay::OnAllChunksAvailable(void)
bool cLightingThread::cLightingChunkStay::OnAllChunksAvailable(void)
{
m_LightingThread.QueueChunkStay(*this);
// Keep the ChunkStay alive:
return false;
}
void cLightingThread::cLightingChunkStay::OnDisabled(void)
{
// Nothing needed in this callback
}