aboutsummaryrefslogtreecommitdiff
path: root/doc (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-08-14Add function `minetest.read_schematic`upsilon3-0/+93
2019-08-13Fix unnecessary exception use in 3 more methods (#8791)Jozef Behran2-16/+7
* Fix unnecessary exception use in Server::SendBlocks The code in this method calls getBlockNoCreate and then messes around with try...catch to skip blocks which are not in the memory. Additionally, it repeatedly calls m_env.getMap() inside this loop. Speed the code up by extracting the m_env.getMap() out of the loop and getting rid of the try...catch. * Fix unnecessary exception use in Server::SendBlock Another unnecessary try...catch is slowing down Server::SendBlock. Remove that to speed it up and get a nice side effect of simplifying the code in question. * Fix unnecessary exception use in MMVManip::initialEmerge Remove another unneeded exception usage from MMVManip::initialEmerge to speed that code up and simplify it but be careful to not remove the braces as there is a TimeTaker in use there.
2019-08-13Fix unnecessary exception use in Map::getSectorXXX (#8792)Jozef Behran3-25/+13
The Map::getSectorNoGenerate throws an exception but no other code is really dependent on that. Fix the odd instance of misuse in ClientMap::emergeSector and remove the exception throwing version of the method along with the "NoEx" suffixes in the names of these methods.
2019-08-13Better F6 profiler (#8750)SmallJoker19-322/+254
Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly)
2019-08-13Fix unnecessary exception use in Map::isNodeUndergroundJozef Behran1-8/+2
The isNodeUnderground calls getBlockNoCreate which calls getBlockNoCreateNoEx and throws InvalidPositionException if the returned value is nullptr, which isNodeUnderground then catches to return "false". Remove the try..catch in isNodeUnderground by calling getBlockNoCreateNoEx instead of getBlockNoCreate and checking the returned value for nullptr.
2019-08-13Fix compare between pointer and 0 in unittestsJozef Behran1-3/+3
Pointers shall be set to nullptr, not 0, according to the coding standards. By implication they shall be compared with nullptr, not 0, too. Fix this code to match that.
2019-08-12Clear old item groups when they are overridden. (#8753)Beha2-14/+36
This fixes overridden items keeping their old groups in the group to items mapping even after their groups have been changed in lua. It also prevents a more widespread issue where overriding an item will add its content ID *twice* to the mapping, resulting in odd behaviour in features such as ABMs.
2019-08-12Add support for set_formspec_prepend in main menu (#8611)rubenwardy5-1/+31
2019-08-12Handle multiple deserialization of a block's entitiesRogier1-0/+9
This fix consists of two parts: - Clear the list of stored entities. This has no side-effects. - Catch the case where active entities exist and print a message. Clearing the active entitiy list has side-effects that should be handled. (those entities are known to the environment and to clients). As avoiding those side-effects is more complex, and as this problem is not expected to occur (with PR #4847 merged), there is no real incentive to implement this ATM. This issue was a contributing factor to bug #4217. With the other contributing factor removed (PR #4847), this commit makes sure this factor does not go unnoticed if it ever happens again.
2019-08-12Update Gradle to 5.5.1 (#8771)hannesa23-7/+6
2019-08-10Fix breakage of non-GLES2 setups (#8774)Jozef Behran1-9/+11
The commit 526a9e4b66abaf83eb6b1aaa3e93375acd87b830 breaks the non-GLES2 setups because the code that is intended to handle that is behind "elseif()" which is interpreted as "elseif(false)" and thus the code never gets executed. Fix that by changing the offending line to else(). Additionally, to avoid breaking the server only build (which shall not have a dependency on GL/GLU/GLES at all), enclose the entire block code in if(BUILD_CLIENT).
2019-08-10Fix some issues with minetest.clear_craft (#8712)Paul Ouellette6-124/+119
* Fix some issues with minetest.clear_craft - Fix memory leak - Fix crafts with an output count not being cleared when clearing by input. - Fix recipe list being reversed when clearing by input. * Add CraftInput::empty()
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran26-139/+120
Finish getNode cleanup
2019-08-10Add player knockback on punch to builtinsfan53-0/+56
2019-08-10Implement adding velocity to player from Luasfan514-2/+105
The intended usecase is knockback, but there's potential for more.
2019-08-08Builtin UI: Move box element to ensure correct draw orderSmallJoker1-2/+2
2019-08-08Allow customizing chat message format (#8529)ANAND10-47/+111
2019-08-08guiVolumeChange: Fix child not being removedANAND1-1/+3
2019-08-07Avoid crash caused by, and improve, 'findSpawnPos()' (#8728)Paramat1-12/+31
Avoid an unsuitable spawn position (which if outside mapgen limits can cause a crash) if the main 0-3999 loop reaches its end. Fallback to a spawn at 0,0,0. Check the mapgen-returned 'spawn_level' value for being outside limits. When 'air_count' reaches 2, move back down 1 to spawn in the lower empty node. If the spawn position is disallowed by 'objectpos_over_limit()', 'break' from loop instead of 'continue' because positions above are probably also over limit. Reset 'air_count' to 0 if an obstruction is found, to make 'air_count' consecutive empty nodes. Allow spawn in 'airlike' drawtype nodes such as mod-added vacuum, alien atmospheres, fog etc. Add clarifying comments and improve codestyle.
2019-08-07Game: Fix double BS multiplicationSmallJoker1-1/+1
2019-08-07Fix usage of wrong variable in builtin chat command handling (#8762)Beha1-1/+1
This was introduced in commit 8e75785 and resulted in chat commands not returning their output text.
2019-08-07Client::Interact: Use InteractAction enum instead of numeric constantsANAND5-60/+59
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
2019-08-07Unify wield item handling (#8677)SmallJoker14-249/+154
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
2019-08-07guiConfirmRegistration: Set focus to text field (#8761)ANAND1-2/+3
2019-08-07Hide chat when console is open (#8656)ANAND3-6/+15
2019-08-07Fix inventory_overlay for nodes without inventory_image (#8433)DS1-0/+10
2019-08-07Optimize usage of TOSERVER_GOTBLOCKS packetsfan52-10/+18
2019-08-07Do not add group values of zero to group lists. (#8751)Beha1-3/+5
This fixes an issue where when the engine looked up groups (for example, in ABM node names), NodeDefManager's m_group_to_items would contain nodes with a group value of zero, resulting in nodes with flammable = 0 being burned by a fire mod with a group:flammable checking ABM. It brings consistency to the behaviour described in the api documentation, where zero and nil groups should be the same.
2019-08-06Clean up and fix freetype=false crashes (#8641)SmallJoker4-254/+132
A IGUIFont of type bitmap/vector cannot be converted to CGUITTFont Fixes various segfaults in gameplay Shorter font cache code, cleaned up (?)
2019-08-06Add luacheck to check builtin (#7895)rubenwardy24-139/+201
2019-08-06Mapgen Flat: Fix and improve getSpawnLevelAtPoint() (#8756)Paramat1-13/+18
Previously, this wrongly returned ground level (a position containing a solid node) as spawn level. Return ground level + 2 (+ 2 to spawn above biome 'dust' nodes). Improve codestyle and make more consistent with generateTerrain().
2019-08-05Update curl dependency in buildbotsfan52-2/+2
2019-08-04Fix binary-string confusion in client network codesfan51-1/+1
2019-08-04Clean up FindOpenGLES2.cmakesfan51-62/+24
2019-08-04Unify GLES support in gui scaling filtersfan53-38/+44
2019-08-04Unify OpenGL ES supportsfan58-21/+39
2019-08-04Let ENABLE_GLES appear in cmake_config.h and change its functionalitysfan53-10/+24
2019-08-03Add formspec testing to test mod in minimalrubenwardy5-139/+333
2019-08-03Add styles to most elementsrubenwardy9-100/+284
2019-08-03Add style[] tag with button supportrubenwardy7-3/+240
2019-08-03Add custom colorable GUIButton implementationrubenwardy9-19/+2471
2019-08-03Fix negative offsets not being supported by container[]rubenwardy1-2/+2
2019-08-02Builtin: Forward old return valuesSmallJoker1-1/+1
Was forgotten in 69bf964.
2019-08-01Correct ServerActiveObject's virtual getArmorGroups() to be const.Beha1-1/+1
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match ServerActiveObject's, notably resulting in the lua get_armor_groups() call returning nothing.
2019-08-01Mainmenu: Use textarea in error formspecsSmallJoker2-43/+31
2019-08-01Group "immortal" also protects players from damageWuzzy5-19/+25
Document new meaning of immortal=1 for players Disable breathing if player is immortal Hide builtin statbars if player immortal (delayed) Co-authored-by: ClobberXD <ClobberXD@gmail.com>
2019-07-31Allow toolcaps to override the built-in times for dig_immediatesfan51-8/+10
2019-07-31Silence invalid clang format warnings in guiScrollBar.cpp (#8724)Paramat1-2/+3
2019-07-30Sky: Refactor of moon and sun drawing (#8683)Methacrylon2-149/+142
Split sun and moon render parts from the main render function.
2019-07-30Move the clamping of hp/breath when their maximums change to ↵Beha6-22/+26
read_object_properties(). (#8689) This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).