Changed a few things

master
Joel Leclerc 2012-05-04 11:11:52 -06:00
parent 74da3a7847
commit c0ffbb7877
26 changed files with 2496 additions and 11 deletions

View File

@ -1230,7 +1230,7 @@ minetest.register_entity("default:monkey_mob_entity", {
description = "The Evil Monkey",
textures = {"default_furnace_front.png"},
visual = "file",
meshfile = "monkey.obj",
meshfile = "altair.3ds",
physical = "true",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

View File

@ -824,13 +824,15 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
assert(rfile);
// Read image
video::IImage *img = vdrv->createImageFromFile(rfile);
if(!img){
if(!img)
{
errorstream<<"Client: Cannot create image from data of "
<<"file \""<<filename<<"\""<<std::endl;
rfile->drop();
return false;
}
else {
else
{
m_tsrc->insertSourceImage(filename, img);
img->drop();
rfile->drop();

View File

@ -1804,7 +1804,7 @@ public:
}
}
}
if(m_prop.visual == "file")
/*if(m_prop.visual == "file")
{
std::string texturestring = "unknown_block.png";
if(m_prop.textures.size() > 0)
@ -1819,12 +1819,12 @@ public:
// Set material flags and texture
video::SMaterial& material = m_meshnode->getMaterial(0);
material.setFlag(video::EMF_LIGHTING, false);
material.setFlag(video::EMF_BILINEAR_FILTER, false);
//material.setFlag(video::EMF_LIGHTING, false);
//material.setFlag(video::EMF_BILINEAR_FILTER, false);
material.setTexture(0, atlas);
material.getTextureMatrix(0).setTextureTranslate(pos.X, pos.Y);
material.getTextureMatrix(0).setTextureScale(size.X, size.Y);
}
//material.getTextureMatrix(0).setTextureTranslate(pos.X, pos.Y);
//material.getTextureMatrix(0).setTextureScale(size.X, size.Y);
}*/
}
void processMessage(const std::string &data)

View File

@ -95,9 +95,13 @@ scene::IAnimatedMesh* createCubeMesh(v3f scale)
scene::IAnimatedMesh* createMeshFromFile(std::string filename, scene::ISceneManager* smgr)
{
std::string path = porting::path_user + DIR_DELIM + "cache" +
DIR_DELIM + "media" + DIR_DELIM;
std::string filepath = path + filename;
smgr->getParameters()->setAttribute( scene::CSM_TEXTURE_PATH, path.c_str() );
scene::SAnimatedMesh *anim_mesh = new scene::SAnimatedMesh(
smgr->getMesh(std::string(porting::path_user + DIR_DELIM + "cache" +
DIR_DELIM + "media" + DIR_DELIM + filename).c_str()));
smgr->getMesh(filepath.c_str()));
anim_mesh->setMaterialFlag( video::EMF_LIGHTING, false );
return anim_mesh;
}