1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

changes to handing of digging (non backwards-compatible i guess)

This commit is contained in:
Perttu Ahola 2010-12-23 22:35:53 +02:00
parent 61b5a35384
commit 10b06419ab
14 changed files with 583 additions and 265 deletions

View file

@ -51,16 +51,25 @@ video::ITexture* IrrlichtWrapper::getTexture(TextureSpec spec)
// Throw a request in
m_get_texture_queue.add(spec, 0, 0, &result_queue);
dstream<<"Waiting for texture "<<spec.name<<std::endl;
// Wait result
GetResult<TextureSpec, video::ITexture*, u8, u8>
result = result_queue.pop_front(1000);
dstream<<"Waiting for texture from main thread: "
<<spec.name<<std::endl;
// Check that at least something worked OK
assert(result.key.name == spec.name);
try
{
// Wait result for a second
GetResult<TextureSpec, video::ITexture*, u8, u8>
result = result_queue.pop_front(1000);
// Check that at least something worked OK
assert(result.key.name == spec.name);
t = result.item;
t = result.item;
}
catch(ItemNotFoundException &e)
{
dstream<<"Waiting for texture timed out."<<std::endl;
t = NULL;
}
}
// Add to cache and return