aboutsummaryrefslogtreecommitdiff
path: root/src/genericobject.cpp
Commit message (Expand)AuthorAge
* Change i++ to ++iDavid Jones2015-08-25
* Fix some issues with animations, and allow non-looped animations to be definedMirceaKitsune2015-06-22
* Generic CAO cleanups and renames for clarificationest312015-06-20
* Generalize core.get/set_nametag_color into core.get/set_nametag_attributesTeTpaAka2015-05-15
* Add get and set functions for the nametag colorTeTpaAka2015-05-15
* Add sneak and sneak_glitch to set_physics_override()PilzAdam2013-12-03
* Allow modifying movement speed, jump height and gravity per-player via the Lu...MirceaKitsune2013-04-05
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Fix Taoki's messed up generic object command idsPerttu Ahola2012-11-29
* A bunch of fixesMirceaKitsune2012-11-25
* Send animations, bone overrides and attachments in entity initialization. Cli...MirceaKitsune2012-11-25
* Complete the attachment framework.MirceaKitsune2012-11-25
* Framework for the attachment system, new object property which allows changin...MirceaKitsune2012-11-25
* Get the new animation framework properly workingMirceaKitsune2012-11-25
* Joint positioning and rotation code, and fix a problem related to their lua APIMirceaKitsune2012-11-25
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Fix dropped nodeitem visualsPerttu Ahola2012-04-04
* ObjectPropertiesPerttu Ahola2012-03-30
* Use GenericCAO in place of LuaEntityCAO and PlayerCAOPerttu Ahola2012-03-29
pan>IBillboardSceneNode *m_spritenode; 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()->getTextureRaw("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 = 64; try{ MapNode n = env->getMap().getNode(floatToInt(pos, BS)); light = decode_light(n.getLightBlend(env->getDayNightRatio(), env->getGameDef()->ndef())); } catch(InvalidPositionException &e){} 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); }