aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-06-24Player: New get_look, set_look APIraymoo
Deprecate get_look / set_look pitch / yaw
2016-06-17Dungeons: Generalise use, add capabilities, various modificationsparamat
- Generalise node names to c_wall and c_alt_wall - Remove 'mossratio' and instead disable alt_wall loop if c_alt_wall == CONTENT_IGNORE - Use one generalised 3D noise for alternative wall nodes and in mgv6 create moss distribution similar to the previous - Rename rarity noise to density noise and enable the option of multiple dungeons per chunk determined by the value. Recreate previous distribution - Add parameters for min and max rooms per dungeon - Add dungeon y limits - Integrate river water properly Generalisation is needed now that we have sandstone and desert stone dungeons by default and can choose any node for alternative structure. The current code is based around cobble dungeons with mossycobble alternative nodes, the 2 noises controlling the alternative nodes are based on wetness. Enabling multiple dungeons per chunk with definable number of rooms allows the option of very dense and complex underground structures that could interconnect to create megastructures. Y limits are added to be consistent with other mapgen elements, and enable locaton of dungeon or megastructure realms as part of our 'stacked realms' philosophy.
2016-06-14Move unknown node message when applying texture overrides to infostream (#4218)Yutao Yuan
Texture packs have no way to know what nodes are available, so this shouldn't be a error message.
2016-06-11Sky.cpp: Improve code style. Define sky colours as SColorparamat
2016-06-11Make node timers more efficientEkdohibs
2016-06-11Random misc. warning fixes and cleanupskwolekr
- Fix unused c_sand member warning in Valleys Mapgen - Fix some code style - Make some std::string params const ref
2016-06-11Settings: Clean up settings changed callback codekwolekr
2016-06-11Server: Add reason for leave to `on_leaveplayer` callbacksDiego Martinez
2016-06-09Sky: Darker, bluer sky and improved horizon haze at nightparamat
Add new colours 'skycolour_bright_night', 'bgcolour_bright_night' and enable these between sunset end and sunrise start Night sky has same hue as day sky but is darker and more saturated Night horizon haze (bgcolour) is slightly less saturated and slightly brighter than night sky, to be consistent with daytime horizon haze
2016-06-08Sky: Fix sunrisebg texture motion (#4199)Paramat
Top of texture no longer shows above horizon during night and day
2016-06-05Mapgen: Optimize biomemap creation by combining with generateBiomeskwolekr
2016-06-05Biome API: Add per-biome riverbed material and depthparamat
Mgvalleys: Remove riverbed sand placement from base terrain generation Riverbed material placement moved to MapgenBasic::generateBiomes() Document fields and add note that the biome API is still unstable
2016-06-04Mapgen: Performance improvement and fixes for updateLiquid (#4065)MillersMan
- Adds only ~100 nodes per chunk to trans_liquid with similar processing time - Adds liquid nodes themselves instead of potential solid nodes below them - CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood - This allows liquid columns to span multiple chunks without being interrupted - NOTE: Expects an one-node border in generation chunk without liquid changes
2016-06-04Biomes: Define and use biome_t for biome IDskwolekr
2016-06-04PcgRandom: Fix/improve documentationkwolekr
2016-06-04Change internal type for seeds to s32kwolekr
This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS.
2016-06-03Initial Gamepad supportest31
Adds initial ingame gamepad support to minetest. Full Formspec support is not implemented yet and can be added by a later change.
2016-06-03Input related generalisationsest31
* Move key types into own file * Use Generalized input methods in game.cpp
2016-06-03Sapier's fix for the RESEND RELIABLE problem (#4170)Robert Kiraly
2016-06-02Mgv7: Always carve river channels in mountain terrainparamat
Previously, rivers were sometimes blocked by vertical walls of mountain terrain due to river carving being disabled when base terrain height was below water_level - 16 Remove now unused base terrain heightmap created in generateTerrain()
2016-05-31Add colored text (not only colored chat).Ekdohibs
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
2016-05-31Colored chat working as expected for both freetype and non-freetype builds. ↵TriBlade9
@nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
2016-05-30Add minetest.check_password_entry callbackest31
Gives a convenient way to check a player's password. This entirely bypasses the SRP protocol, so should be used with great care. This function is not intended to be used in-game, but solely by external protocols, where no authentication of the minetest engine is provided, and also only for protocols, in which the user already gives the server the plaintext password. Examples for good use are the classical http form, or irc, an example for a bad use is a password change dialog inside formspec. Users should be aware that they lose the advantages of the SRP protocol if they enter their passwords for servers outside the normal entry box, like in in-game formspec menus, or through irc /msg s, This patch also fixes an auth.h mistake which has mixed up the order of params inside the decode_srp_verifier_and_salt function. Zeno-: Added errorstream message for invalid format when I committed
2016-05-30Remove unused code in s_security.cpp (#4172)Zeno-
Note that the macro CHECK_FILE_ERR implements the code removed
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-05-27Add base64 encoding and decoding to the lua api. (#3919)red-001
2016-05-27Disallow external linkage for default Cavegen NoiseParamskwolekr
2016-05-27Dungeongen: Remove dependency on Mapgenkwolekr
2016-05-27Mapgen: Combine dungeon generation codekwolekr
2016-05-27Mapgen: Deduplicate common constructor codekwolekr
2016-05-27Mapgen: Remove calculateNoise from most mapgenskwolekr
This commit moves noise calculation to the functions where the noise is actually required, increasing the separation of concerns and level of interdependency for each mapgen method. Valleys Mapgen is left unmodified.
2016-05-27Mapgen V7: Remove now-unused ridge heightmapkwolekr
2016-05-27Cavegen: Move V5-style caves to CavesNoiseIntersectionkwolekr
2016-05-27Cavegen: Minor misc. fixeskwolekr
- Convert instances of numeric literal doubles to floats - Move dswitchint to a local variable now that being a member is unnecessary - Improve const correctness - Indentation fixes
2016-05-27Fix undefined evaluation order when constructing random vectorskwolekr
MSVC and GCC evaluate parameters in right-to-left order, whereas Clang evaluates in left-to-right order, and of course, an optimization could leave the order of evaluation completely indeterminate. This commit fixes all instances of the error by explicitly assigning the results of expressions that use PseudoRandom::next() or range() to their respective vector components. The right-to-left evaluation behavior is preserved since Clang is much less commonly used to compile Minetest than GCC and MSVC combined, and would therefore cause the least harm.
2016-05-27Cavegen: Re-add small caves to CavesRandomWalkkwolekr
2016-05-27Cavegen: Remove CavesRandomWalk dependency on Mapgenkwolekr
2016-05-27Cavegen: Merge instances of repetitive surface level-finding codekwolekr
2016-05-27Cavegen: Remove CavesV6 dependency on Mapgenkwolekr
2016-05-27Cavegen: Rename CaveV6 to CavesV6kwolekr
- Add comment explaining why it exists - Remove unused 'flooded' variable - Rename shadowed variable - Fix some code style
2016-05-27Cavegen: Merge CaveV5 and CaveV7 into CavesRandomWalkkwolekr
2016-05-27Fix MgStoneType and BiomeType enum nameskwolekr
2016-05-27Mapgen: Combine generateBiomes, dustTopNodes, and generateCaveskwolekr
This commit condenses the above methods into a single implementation used by V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
2016-05-27Move biome calculation to BiomeGenkwolekr
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes for a given area using the algorithm implemented by that specific BiomeGen. This abstracts away the old system where each mapgen supplied the noises required for biome generation.
2016-05-26Tell irrlicht if we handle a key or not.est31
We can remove the function in MtNativeActivity now as it serves precisely that purpose: to tell irrlicht that we handled the esc key. TODO for later: * Perhaps try to find a more performant container than KeyList
2016-05-23Fix rollback.txt migrationShadowNinja
Broken by b1965ac20922e3722392114bd63a22b403dcbe98. This also prepares the begin and commit statements only once.
2016-05-24Fix irrlicht version checking macro for tooltip_height calculationCraig Robbins
2016-05-23Move updateTextures and fillTileAttribs to ContentFeaturesEkdohibs
2016-05-22Tolerate packet reordering in the early init processest31
Fixes a bug where packet reordering made the server give the client two peer ids instead of one. This in turn confused reliable packet sending and made connecting to the server fail. The client usually sends three packets at init: one "dummy" packet consisting of two 0 bytes, and the init packet as well as its legacy counterpart. The last one can be turned off since commit af30183124d40a969040d7de4b3a487feec466e4, but this is of lower relevance for the bug. The relevant part here is that network packet reorder (which is a normal occurence) can make the packets reach the server in different order. If reorder puts the dummy packet further behind, the following would happen before the patch: 1. The server will get one of the init packets on channel 1 and assign the client a peer id, as the packet will have zero as peer id. 2. The server sends a CONTROLTYPE_SET_PEER_ID packet to inform the client of the peer id. 3. The next packet from the client will contain the peer id set by the server. 4. The server sets the m_has_sent_with_id member for the client's peer structure to true. 5. Now the dummy packet arrives. It has a peer id of zero, therefore the server searches whether it already has a peer id for the address the packet was sent from. The search fails because m_has_sent_with_id was set to true and the server only searched for peers with m_has_sent_with_id set to false. 6. In a working setup, the server would assign the dummy packet to the correct peer id. However the server instead now assigns a second peer id and peer structure to the peer, and assign the packet to that new peer. 7. In order to inform the peer of its peer id, the server sends a CONTROLTYPE_SET_PEER_ID command packet, reliably, to the peer. This packet uses the new peer id. 8. The client sends an ack to that packet, not with the new peer id but with the peer id sent in 2. 9. This packet reaches the server, but it drops the ACK as the peer id does not map to any un-ACK-ed packets with that seqnum. The same time, the server still waits for an ACK with the new peer id, which of course won't come. This causes the server to periodically re-try sending that packet, and the client ACKing it each time. Steps 7-9 cause annoyances and erroneous output, but don't cause the connection failure itself. The actual mistake that causes the connection failure happens in 6: The server does not assign the dummy packet to the correct peer, but to a newly created one. Therefore, all further packets sent by the client on channel 0 are now buffered by the server as it waits for the dummy packet to reach the peer, which of course doesn't happen as the server assigned that packet to the second peer it created for the client. This makes the connection code indefinitely buffer the TOSERVER_CLIENT_READY packet, not passing it to higher level code, which stalls the continuation of the further init process indefinitely and causes the actual bug. Maybe this can be caused by reordered init packets as well, the only studied case was where network has reliably reordered the dummy packet to get sent after the init packets. The patch fixes the bug by not ignoring peers where m_has_sent_with_id has been set anymore. The other changes of the patch are just cleanups of unused methods and fields and additional explanatory comments. One could think of alternate ways to fix the bug: * The client could simply take the new peer id and continue communicating with that. This is however worse than the fix as it requires the peer id set command to be sent reliably (which currently happens, but it cant be changed anymore). Also, such a change would require both server and client to be patched in order for the bug to be fixed, as right now the client ignores peer id set commands after the peer id is different from PEER_ID_INEXISTENT and the server requires modification too to change the peer id internally. And, most importantly, right now we guarantee higher level server code that the peer id for a certain peer does not change. This guarantee would have to be broken, and it would require much larger changes to the server than this patch means. * One could stop sending the dummy packet. One may be unsure whether this is a good idea, as the meaning of the dummy packet is not known (it might be there for something important), and as it is possible that the init packets may cause this problem as well (although it may be possible too that they can't cause this). Thanks to @auouymous who had originally reported this bug and who has helped patiently in finding its cause.
2016-05-22Fix a m_camera not used warning fix pointed by clangLoic Blot