Commit Graph

48 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
SmallJoker 4979544ff2 ParticleSpawner::step cleanup and rotation fix (#6486)
* Particles: Move spawner code to a separate fucntion
2018-06-03 17:31:59 +02:00
raymoo 5881ef50b4 Fix attached particle spawners far from spawn (#6479)
* Fix attached particle spawners far from spawn

When far from spawn, attached particle spawners
did not spawn particles.
2018-06-03 17:31:59 +02:00
Maksim Gamarnik 35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
Paramat b234890f33 Particle spawner: Do not spawn particles distant from player (#5766)
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-05-20 16:46:35 +02:00
Dániel Juhász b12ed27315 Soft node overlay (#5186)
This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
2017-04-21 23:34:59 +10:00
Maksim Gamarnik e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
Dániel Juhász d5a0b5283e Add hardware node coloring. Includes:
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-23 07:27:12 +01:00
sfan5 ef197b4880 Add particle animation, glow
This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
2017-01-18 23:21:01 +01:00
Ner'zhul 14a094c1a2 Environment & IGameDef code refactoring (#4985)
* 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-09 20:39:22 +01:00
sfan5 c68d446afa Add 2D sheet animation for nodes 2017-01-02 15:28:06 +01:00
sfan5 779eb70e7e Move TileAnimation code to seperate file 2017-01-02 15:28:06 +01:00
orwell96 a1097d3a35 Particles: Make attached particle spawners respect the parent's yaw
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-18 06:18:54 +00:00
sfan5 a99777ab39 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-14 15:28:06 +01:00
Foghrye4 04ea490226 Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
Gael-de-Sailly df8f958a12 ParticleSpawner: fix offset being added twice 2016-10-25 20:39:39 +02:00
raymoo 6e0388ece4 Attached particle spawners 2016-10-13 17:33:16 +02:00
Auke Kok 9cb1159917 Particles: Add option to remove particles on collision
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-05-28 00:08:23 -04:00
Maksim Gamarnik da97d550e7 ver. 1.1.2.3 2016-04-08 20:43:15 +03:00
Maksim Gamarnik 0b19e56113 Merge remote-tracking branch 'upstream1/master' 2016-04-01 00:33:55 +03:00
Loic Blot 719153bd52 ParticleManager::handleParticleEvent: use switch
Use a proper switch with breaks.
2016-03-30 17:20:24 +02:00
Maksim Gamarnik d7c0fad71f Merge Minetest commits 2016-02-11 22:35:23 +02:00
nerzhul c4bf66116d v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
Maksim Gamarnik 2520ca3ed1 Merge branch 'master' of https://github.com/minetest/minetest 2016-01-31 20:57:03 +02:00
est31 d6f58c3f84 Don't pass non-const references to collision methods
Non const references cause a lot of confusion with behaviour of code,
and are disallowed by minetest style guide.
2016-01-29 15:53:54 +01:00
Maksim Gamarnik 919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
David Jones 9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
ShadowNinja 098d28aa5e Clean up threading
* 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-08-23 22:04:06 -04:00
Maksim Gamarnik 9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
obneq 805e6244dc fix infinite spawners 2015-04-18 20:14:34 +02:00
Craig Robbins 0731f9ed2a Move globals from main.cpp to more sane locations
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-04-01 23:04:25 +10:00
Aaron Suen b7263a190f Move texture_min_size even further down the pipe. Now, textures are 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-31 16:56:33 +10:00
Loic Blot 188c15c3d8 Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/ 2015-03-05 11:59:40 +01:00
BlockMen 6901d26cf8 Fix some rendering glitches
- Fixes particle draworder
- Fixes nodehighlighting
2015-03-05 10:51:18 +01:00
Loic Blot 28feef926f Revert "Fix particles draworder" (issue #2388)
This reverts commit c09d026f0561ee3c6db821a7e193716f724a0e4a.
2015-02-27 14:15:24 +01:00
BlockMen 033c80a4d8 Fix particles draworder 2015-02-21 14:11:00 +01:00
Craig Robbins 4afc9e90e2 Fix particles causing unitialised data being used due to use of incorrect union member 2015-01-18 20:30:57 +10:00
sapier 3bba80cbc2 Fix memory leaks due to messed up memory handling for particles as well as their spawners 2015-01-09 15:23:49 +01:00
Craig Robbins aacc3cba46 Remove most exceptions from getNode() (and variants) 2014-11-14 18:05:34 +10:00
Novatux a662fe9fc4 Fix rendering glitches when far from the center of the map 2014-03-04 20:12:10 +01:00
khonkhortisan 5874af4d8f Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way.

separate particles(pawner) definition, add default values, work with no
arguments
2014-01-13 17:34:56 -05:00
Kahrl 7e4691b89b Fix particle code ignoring return value of std::vector::erase(). Wat. 2013-12-23 15:11:53 +01:00
Kahrl 46340cbbe0 Remove texture atlas / AtlasPointer, rename getTextureRaw to getTexture 2013-07-02 03:03:10 +02:00
sapier fd60aa7e67 Closed add object <-> object collision handling 2013-03-28 00:09:24 +01:00
Jeija a8562392b0 Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.

Conflicts:
	src/clientserver.h
2013-03-23 23:16:29 +01:00
Sfan5 3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 269f01224b Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Jeija 3bc285a3e0 Add particles 2013-01-14 15:27:00 +01:00