mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-05 18:41:05 +00:00
Cracking blocks while digging
This commit is contained in:
parent
d5a78c1253
commit
3b0bff2f74
16 changed files with 232 additions and 289 deletions
|
@ -48,6 +48,9 @@ public:
|
|||
|
||||
void set(std::string name, video::ITexture *texture)
|
||||
{
|
||||
if(texture == NULL)
|
||||
return;
|
||||
|
||||
JMutexAutoLock lock(m_mutex);
|
||||
|
||||
m_textures[name] = texture;
|
||||
|
@ -78,7 +81,7 @@ struct TextureMod
|
|||
Shall not modify or delete the original texture.
|
||||
*/
|
||||
virtual video::ITexture * make(video::ITexture *original,
|
||||
video::IVideoDriver* driver) = 0;
|
||||
const char *newname, video::IVideoDriver* driver) = 0;
|
||||
};
|
||||
|
||||
struct CrackTextureMod: public TextureMod
|
||||
|
@ -89,7 +92,7 @@ struct CrackTextureMod: public TextureMod
|
|||
}
|
||||
|
||||
virtual video::ITexture * make(video::ITexture *original,
|
||||
video::IVideoDriver* driver);
|
||||
const char *newname, video::IVideoDriver* driver);
|
||||
|
||||
u16 progression;
|
||||
};
|
||||
|
@ -149,10 +152,11 @@ public:
|
|||
These are called from other threads
|
||||
*/
|
||||
|
||||
// Not exactly thread-safe but this needs to be fast
|
||||
// Not exactly thread-safe but this needs to be fast.
|
||||
// getTimer()->getRealTime() only reads one variable anyway.
|
||||
u32 getTime()
|
||||
{
|
||||
return m_device->getTimer()->getTime();
|
||||
return m_device->getTimer()->getRealTime();
|
||||
}
|
||||
|
||||
video::ITexture* getTexture(TextureSpec spec);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue