1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Added a more flexible path system (and fixed some minor stuff)

This commit is contained in:
Perttu Ahola 2011-01-07 19:39:27 +02:00
parent dc414091e7
commit 6b6c2d37ea
22 changed files with 356 additions and 111 deletions

View file

@ -757,17 +757,17 @@ void MapBlock::updateMesh(u32 daynight_ratio)
= video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
if(dir == v3s16(0,-1,0))
buf->getMaterial().setTexture(0,
g_irrlicht->getTexture("../data/torch_on_floor.png"));
g_irrlicht->getTexture(porting::getDataPath("torch_on_floor.png").c_str()));
else if(dir == v3s16(0,1,0))
buf->getMaterial().setTexture(0,
g_irrlicht->getTexture("../data/torch_on_ceiling.png"));
g_irrlicht->getTexture(porting::getDataPath("torch_on_ceiling.png").c_str()));
// For backwards compatibility
else if(dir == v3s16(0,0,0))
buf->getMaterial().setTexture(0,
g_irrlicht->getTexture("../data/torch_on_floor.png"));
g_irrlicht->getTexture(porting::getDataPath("torch_on_floor.png").c_str()));
else
buf->getMaterial().setTexture(0,
g_irrlicht->getTexture("../data/torch.png"));
g_irrlicht->getTexture(porting::getDataPath("torch.png").c_str()));
// Add to mesh
mesh_new->addMeshBuffer(buf);