aboutsummaryrefslogtreecommitdiff
path: root/src/voxel.cpp
Commit message (Expand)AuthorAge
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
* Remove unused light updating codeDániel Juhász2018-02-04
* Modernize source code: last part (#6285)Loïc Blot2017-08-20
* VoxelManip cleanups (const ref, const move) + function removal (#6169)Loïc Blot2017-07-26
* Cpp11 initializers: last src root changeset (#6022)Loïc Blot2017-06-21
* Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker2017-05-26
* Remove some old dead code. Fix some Clang warnings in SRP (ng->N... willLoic Blot2015-07-24
* Optimise MapBlockMesh related functionsgregorycu2015-02-23
* Create empty default constructor for MapNodeCraig Robbins2015-01-18
* Add VoxelArea::hasEmptyExtentunknown2015-01-13
* VoxelManipulator: Remove unnecessary deallocation stepskwolekr2014-12-27
* Large increase in performanceCraig Robbins2014-12-24
* Use std::string::empty() instead of size() where applicableAnton2014-12-12
* Optimise VoxelManipulator::copyFromCraig Robbins2014-12-04
* Optimise functions from CNodeDefManager and VoxelManipulatorCraig Robbins2014-11-21
* Remove emerge and speedup addArea by using memcopy instead of one by one assi...sapier2014-06-23
* Use memset for flag initialization (compiler optimization is way better)sapier2014-06-23
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Fix nearly all warningskwolekr2013-05-19
* Migrate to STL containers/algorithms.Ilya Zhuravlev2013-03-11
* Fix most walled-off caveskwolekr2013-02-25
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* 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
* Implement propagateSunlight for VoxelManipulatorPerttu Ahola2012-03-27
* Optimize lighting by a tiny bitPerttu Ahola2011-11-29
* GameDef compilesPerttu Ahola2011-11-29
* extended content-type rangePerttu Ahola2011-07-23
* Moved some mapnode content stuff from mapnode.{h,cpp} and digging property st...Perttu Ahola2011-06-17
* partly working chunk-based map generator (doesn't save properly, spawn is pre...Perttu Ahola2011-02-01
* map generation framework under development... not quite operational at this p...Perttu Ahola2011-01-30
* Reworked texture, material, mineral and whatever handlingPerttu Ahola2011-01-26
* removed alternative name "pressure" from param2Perttu Ahola2011-01-25
* Faster lighting at map generation timePerttu Ahola2011-01-24
* commented out old water stuffPerttu Ahola2011-01-24
* old water removed, some fixes here and therePerttu Ahola2011-01-17
* working goodPerttu Ahola2010-12-26
* some work-in-progressPerttu Ahola2010-12-22
* organizing stuff.Perttu Ahola2010-12-21
* framework for modifying texturesPerttu Ahola2010-12-20
* day/night working client sidePerttu Ahola2010-12-19
* before daynight mesh cachePerttu Ahola2010-12-18
* little fixesPerttu Ahola2010-12-14
* working nicelyPerttu Ahola2010-12-13
* starting to separate "material" to "content" and "tile"Perttu Ahola2010-12-12
* removed accidental double flowWaterPerttu Ahola2010-12-11
* commit before some radicallish changes to water behaviorPerttu Ahola2010-12-11
* some work-in-progress water stuffPerttu Ahola2010-12-01
* license stuffPerttu Ahola2010-11-29
"hl opt">; float m_size; //! Color without lighting video::SColor m_base_color; //! Final rendered color video::SColor m_color; bool m_collisiondetection; bool m_collision_removal; bool m_vertical; v3s16 m_camera_offset; struct TileAnimationParams m_animation; float m_animation_time; int m_animation_frame; u8 m_glow; }; class ParticleSpawner { public: ParticleSpawner(IGameDef* gamedef, scene::ISceneManager *smgr, LocalPlayer *player, u16 amount, float time, v3f minp, v3f maxp, v3f minvel, v3f maxvel, v3f minacc, v3f maxacc, float minexptime, float maxexptime, float minsize, float maxsize, bool collisiondetection, bool collision_removal, u16 attached_id, bool vertical, video::ITexture *texture, u32 id, const struct TileAnimationParams &anim, u8 glow, ParticleManager* p_manager); ~ParticleSpawner(); void step(float dtime, ClientEnvironment *env); bool get_expired () { return (m_amount <= 0) && m_spawntime != 0; } private: ParticleManager* m_particlemanager; float m_time; IGameDef *m_gamedef; scene::ISceneManager *m_smgr; LocalPlayer *m_player; u16 m_amount; float m_spawntime; v3f m_minpos; v3f m_maxpos; v3f m_minvel; v3f m_maxvel; v3f m_minacc; v3f m_maxacc; float m_minexptime; float m_maxexptime; float m_minsize; float m_maxsize; video::ITexture *m_texture; std::vector<float> m_spawntimes; bool m_collisiondetection; bool m_collision_removal; bool m_vertical; u16 m_attached_id; struct TileAnimationParams m_animation; u8 m_glow; }; /** * Class doing particle as well as their spawners handling */ class ParticleManager { friend class ParticleSpawner; public: ParticleManager(ClientEnvironment* env); ~ParticleManager(); void step (float dtime); void handleParticleEvent(ClientEvent *event, Client *client, scene::ISceneManager* smgr, LocalPlayer *player); void addDiggingParticles(IGameDef* gamedef, scene::ISceneManager* smgr, LocalPlayer *player, v3s16 pos, const MapNode &n, const ContentFeatures &f); void addPunchingParticles(IGameDef* gamedef, scene::ISceneManager* smgr, LocalPlayer *player, v3s16 pos, const MapNode &n, const ContentFeatures &f); void addNodeParticle(IGameDef* gamedef, scene::ISceneManager* smgr, LocalPlayer *player, v3s16 pos, const MapNode &n, const ContentFeatures &f); protected: void addParticle(Particle* toadd); private: void stepParticles (float dtime); void stepSpawners (float dtime); void clearAll (); std::vector<Particle*> m_particles; std::map<u32, ParticleSpawner*> m_particle_spawners; ClientEnvironment* m_env; Mutex m_particle_list_lock; Mutex m_spawner_list_lock; }; #endif