aboutsummaryrefslogtreecommitdiff
path: root/src/nodemetadata.cpp
Commit message (Expand)AuthorAge
* Move NodeMetadata prototype containers to content_nodemeta.cpp to fix them no...Perttu Ahola2011-12-01
* Mode node definition loading from Lua (still not finished), fix metadata crea...Perttu Ahola2011-11-29
* Add names to NodeMetadataPerttu Ahola2011-11-29
* Create framework for getting rid of global definitions of node/tool/item/what...Perttu Ahola2011-11-29
* Switch more stuff to use the logging thing and fix segfault on player leave f...Perttu Ahola2011-10-16
* Created and moved stuff to content_nodemeta.{h,cpp}Perttu Ahola2011-06-18
* Moved some mapnode content stuff from mapnode.{h,cpp} and digging property st...Perttu Ahola2011-06-17
* hopefully fixed old furnaces taking ridiculous amounts of cpu and halting the...Perttu Ahola2011-06-16
* Reduced server CPU usage on NodeMetadata step()s. Also furnace now cooks whil...Perttu Ahola2011-05-31
* Some progress on transitioning from MapBlockObject to ActiveObject.Perttu Ahola2011-04-08
* fixed the bug of disabled removal of empty chestsPerttu Ahola2011-04-06
* Furnace is now usable. Added more tools.Perttu Ahola2011-04-05
* A more robust format for node metadataPerttu Ahola2011-04-05
* initial workings of the furnacePerttu Ahola2011-04-05
* changed node metadata format to better accomodate future needs and problemsPerttu Ahola2011-04-05
* Chests work now!Perttu Ahola2011-04-04
* initial chest metadataPerttu Ahola2011-04-04
* forgot some filesPerttu Ahola2011-04-04
kwc">public: SmokePuffCSO(scene::ISceneManager *smgr, ClientEnvironment *env, v3f pos, v2f size): m_age(0), m_spritenode(NULL) { infostream<<"SmokePuffCSO: constructing"<<std::endl; m_spritenode = smgr->addBillboardSceneNode( NULL, v2f(1,1), pos, -1); m_spritenode->setMaterialTexture(0, env->getGameDef()->tsrc()->getTextureForMesh("smoke_puff.png")); m_spritenode->setMaterialFlag(video::EMF_LIGHTING, false); m_spritenode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); //m_spritenode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF); m_spritenode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL); m_spritenode->setMaterialFlag(video::EMF_FOG_ENABLE, true); m_spritenode->setColor(video::SColor(255,0,0,0)); m_spritenode->setVisible(true); m_spritenode->setSize(size); /* Update brightness */ u8 light; bool pos_ok; MapNode n = env->getMap().getNodeNoEx(floatToInt(pos, BS), &pos_ok); light = pos_ok ? decode_light(n.getLightBlend(env->getDayNightRatio(), env->getGameDef()->ndef())) : 64; video::SColor color(255,light,light,light); m_spritenode->setColor(color); } virtual ~SmokePuffCSO() { infostream<<"SmokePuffCSO: destructing"<<std::endl; m_spritenode->remove(); } void step(float dtime) { m_age += dtime; if(m_age > 1.0){ m_to_be_removed = true; } } }; ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr, ClientEnvironment *env, v3f pos, v2f size) { return new SmokePuffCSO(smgr, env, pos, size); }