aboutsummaryrefslogtreecommitdiff
path: root/src/particles.cpp
AgeCommit message (Collapse)Author
2020-10-01(se)SerializeString: Include max length in the nameSmallJoker
This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
2020-05-23Implement spawning particles with node texture appearancesfan5
2020-05-22Cleanup of particle & particlespawner structures and code (#9893)sfan5
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-10-04Dig particles: Various improvements (#7714)Paramat
Improve codestyle. Add clarifying comments. Use 'movement_gravity' setting and physics override instead of hardcoded value. Halve number of particles in final 'node dug' burst. Avoid extremely small, near-invisible particles. Increase velocity to increase number emerging from within a cubic node.
2018-09-08Particles: Make collision with objects optional (#7682)Paramat
Also set it to false for node dig particles, as they are often created and high in number. Improve particle documentation.
2018-04-04Fix last performance-type-promotion-in-math-fn problemsLoic Blot
2017-10-15Real global textures (#6105)Vitaliy
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
2017-10-02ParticleSpawner::step cleanup and rotation fix (#6486)SmallJoker
* Particles: Move spawner code to a separate fucntion
2017-09-30Fix attached particle spawners far from spawn (#6479)raymoo
* Fix attached particle spawners far from spawn When far from spawn, attached particle spawners did not spawn particles.
2017-09-08Particles: Do not add digging particles for airlike nodes (#6392)SmallJoker
2017-08-28Clientevent refactor (#6320)Loïc Blot
* Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
2017-08-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
2017-08-18Optimize headers (part 2) (#6272)Loïc Blot
* Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
2017-07-26TileLayer: use shared_ptr for FrameSpec vector (#6171)Loïc Blot
* TileLayer: use shared_ptr for vector framespec This reduce memory copy of TileLayer from (4 to 16) * FrameSpec where FrameSpec = (sizeof(int) + 3 * sizeof(ptr)) to int + sizeof(ptr) Callgrind difference Before: https://lut.im/RGkiJqQb8T/LeQIEXpAuRzfl7gd.png After: https://lut.im/bcqmwee1xu/cTwtptY5tRuS9lp0.png * Fix one push_back to use vector::emplace_back & optimize inclusions
2017-06-26Isolate irrlicht references and use a singleton (#6041)Loïc Blot
* Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
2017-06-18Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot
2017-06-11Use thread_local instead from some static settings (#5955)Loïc Blot
thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
2017-05-20Particle spawner: Do not spawn particles distant from player (#5766)Paramat
Previously, every particle was rendered by (even if not actually visible to) the client regardless of distance. This significantly reduced client FPS. Acts clientside, particle spawners are always sent to clients, but each particle is checked for distance from the player. As with 'add particle' the distance limit is set to 'max block send distance' as this determines how far a client can see.
2017-04-21Soft node overlay (#5186)Dániel Juhász
This commit adds node overlays, which are tiles that are drawn on top of other tiles.
2017-01-23Add hardware node coloring. Includes:Dániel Juhász
- Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-18Add particle animation, glowsfan5
This is implemented by reusing and extending the TileAnimation code for the methods used by particles.
2017-01-09Environment & IGameDef code refactoring (#4985)Ner'zhul
* Environment code refactoring * Cleanup includes & class declarations in client & server environment to improve build speed * ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts. * Cleanup IGameDef * Move ITextureSource* IGameDef::getTextureSource() to Client only. * Also move ITextureSource *IGameDef::tsrc() helper * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call * drop unused emerge() call * cleanup server unused functions (mentionned before) * Drop one unused parameter from ContentFeatures::updateTextures * move checkLocalPrivilege to Client * Remove some unnecessary casts * create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it * Fix some comments * Change required IGameDef to Server/Client pointers * Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects * Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu * drop ClientMap::sectorWasDrawn which is unused
2017-01-02Add 2D sheet animation for nodessfan5
2017-01-02Move TileAnimation code to seperate filesfan5
2016-11-18Particles: Make attached particle spawners respect the parent's yaworwell96
Position, velocity and acceleration vectors of particles are rotated by the yaw of the parent object so that they are truly relative to it. Clarify new attached particle spawner behavior in lua_api.txt.
2016-11-14Revert "Adding particle blend, glow and animation (#4705)"sfan5
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-15Adding particle blend, glow and animation (#4705)Foghrye4
2016-10-25ParticleSpawner: fix offset being added twiceGael-de-Sailly
2016-10-13Attached particle spawnersraymoo
2016-05-28Particles: Add option to remove particles on collisionAuke Kok
Adds the particle option `collision_removal = bool` Some particles are hard to use right now since they either go through solid blocks (without collision detection), and with collision detection enabled they (e.g. raindrops) would just stop dead on the floor and sit there until they expire, or worse, scrape along a wall or ceiling. We can solve the problem by adding a boolean flag that tells the particle to be removed if it ever collides with something. This will make it easier to add rain that doesn't fall through your roof or stick on the top of it. Or clouds and smoke that don't go through trees. Particles that collide with this flag are marked expired unconditionally, causing them to be treated like normal expired particles and cleaned up normally. Documentation is adjusted accordingly. An added bonus of this patch is that particles can potentially collide many times with nodes, and this reduces the amount of collisions to 1 (max), which may end up reducing particle load on the client.
2016-03-30ParticleManager::handleParticleEvent: use switchLoic Blot
Use a proper switch with breaks.
2016-02-11v2d & aabbox3d<f32> & sky cleanupsnerzhul
* Sky: rename Box => m_box and inline getBoundingBox * Uniformize aabbox3d<f32> to aabb3f
2016-01-29Don't pass non-const references to collision methodsest31
Non const references cause a lot of confusion with behaviour of code, and are disallowed by minetest style guide.
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-04-18fix infinite spawnersobneq
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-31Move texture_min_size even further down the pipe. Now, textures are ↵Aaron Suen
JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements.
2015-03-05Replace std::list to std::vector into tile.cpp (m_texture_trash) and move ↵Loic Blot
tile.hpp to src/client/
2015-03-05Fix some rendering glitchesBlockMen
- Fixes particle draworder - Fixes nodehighlighting
2015-02-27Revert "Fix particles draworder" (issue #2388)Loic Blot
This reverts commit c09d026f0561ee3c6db821a7e193716f724a0e4a.
2015-02-21Fix particles draworderBlockMen
2015-01-18Fix particles causing unitialised data being used due to use of incorrect ↵Craig Robbins
union member
2015-01-09Fix memory leaks due to messed up memory handling for particles as well as ↵sapier
their spawners
2014-11-14Remove most exceptions from getNode() (and variants)Craig Robbins
2014-03-04Fix rendering glitches when far from the center of the mapNovatux
2014-01-13Allow vertical axis particle rotation constraintkhonkhortisan
Use tables for adding particles, deprecate former way. separate particles(pawner) definition, add default values, work with no arguments
2013-12-23Fix particle code ignoring return value of std::vector::erase(). Wat.Kahrl
2013-07-02Remove texture atlas / AtlasPointer, rename getTextureRaw to getTextureKahrl