mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Merge remote-tracking branch 'jn/random-fixes'
This commit is contained in:
commit
14a71590c3
@ -1650,7 +1650,7 @@ minetest.add_to_creative_inventory('default:cactus')
|
|||||||
minetest.add_to_creative_inventory('default:papyrus')
|
minetest.add_to_creative_inventory('default:papyrus')
|
||||||
minetest.add_to_creative_inventory('default:bookshelf')
|
minetest.add_to_creative_inventory('default:bookshelf')
|
||||||
minetest.add_to_creative_inventory('default:glass')
|
minetest.add_to_creative_inventory('default:glass')
|
||||||
minetest.add_to_creative_inventory('default:fence')
|
minetest.add_to_creative_inventory('default:fence_wood')
|
||||||
minetest.add_to_creative_inventory('default:rail')
|
minetest.add_to_creative_inventory('default:rail')
|
||||||
minetest.add_to_creative_inventory('default:mese')
|
minetest.add_to_creative_inventory('default:mese')
|
||||||
minetest.add_to_creative_inventory('default:chest')
|
minetest.add_to_creative_inventory('default:chest')
|
||||||
@ -1781,6 +1781,9 @@ local function handle_give_command(cmd, giver, receiver, stackstring)
|
|||||||
else
|
else
|
||||||
partiality = "partially "
|
partiality = "partially "
|
||||||
end
|
end
|
||||||
|
-- The actual item stack string may be different from what the "giver"
|
||||||
|
-- entered (e.g. big numbers are always interpreted as 2^16-1).
|
||||||
|
stackstring = itemstack:to_string()
|
||||||
if giver == receiver then
|
if giver == receiver then
|
||||||
minetest.chat_send_player(giver, '"'..stackstring
|
minetest.chat_send_player(giver, '"'..stackstring
|
||||||
..'" '..partiality..'added to inventory.');
|
..'" '..partiality..'added to inventory.');
|
||||||
|
@ -417,7 +417,13 @@ public:
|
|||||||
light_position,
|
light_position,
|
||||||
light_color,
|
light_color,
|
||||||
light_radius);
|
light_radius);
|
||||||
// Note: might have returned NULL
|
|
||||||
|
// render-to-target didn't work
|
||||||
|
if(def->inventory_texture == NULL)
|
||||||
|
{
|
||||||
|
def->inventory_texture =
|
||||||
|
tsrc->getTextureRaw(f.tname_tiles[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -422,8 +422,13 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
|
|||||||
video::IVideoDriver *driver = device->getVideoDriver();
|
video::IVideoDriver *driver = device->getVideoDriver();
|
||||||
if(driver->queryFeature(video::EVDF_RENDER_TO_TARGET) == false)
|
if(driver->queryFeature(video::EVDF_RENDER_TO_TARGET) == false)
|
||||||
{
|
{
|
||||||
errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET"
|
static bool warned = false;
|
||||||
" not supported."<<std::endl;
|
if(!warned)
|
||||||
|
{
|
||||||
|
errorstream<<"generateTextureFromMesh(): EVDF_RENDER_TO_TARGET"
|
||||||
|
" not supported."<<std::endl;
|
||||||
|
warned = true;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
src/tile.cpp
14
src/tile.cpp
@ -1023,15 +1023,9 @@ video::IImage* generate_image_from_scratch(std::string name,
|
|||||||
char separator = '^';
|
char separator = '^';
|
||||||
|
|
||||||
// Find last meta separator in name
|
// Find last meta separator in name
|
||||||
s32 last_separator_position = -1;
|
s32 last_separator_position = name.find_last_of(separator);
|
||||||
for(s32 i=name.size()-1; i>=0; i--)
|
//if(last_separator_position == std::npos)
|
||||||
{
|
// last_separator_position = -1;
|
||||||
if(name[i] == separator)
|
|
||||||
{
|
|
||||||
last_separator_position = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*infostream<<"generate_image_from_scratch(): "
|
/*infostream<<"generate_image_from_scratch(): "
|
||||||
<<"last_separator_position="<<last_separator_position
|
<<"last_separator_position="<<last_separator_position
|
||||||
@ -1489,8 +1483,6 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
|
|||||||
|
|
||||||
if(rtt == NULL)
|
if(rtt == NULL)
|
||||||
{
|
{
|
||||||
errorstream<<"generate_image(): render to texture failed."
|
|
||||||
" Creating fallback image"<<std::endl;
|
|
||||||
baseimg = generate_image_from_scratch(
|
baseimg = generate_image_from_scratch(
|
||||||
imagename_top, device, sourcecache);
|
imagename_top, device, sourcecache);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user