Commit Graph

40 Commits (0dbf454870dc17a12dec5a438bc87f81c5a3f1e3)

Author SHA1 Message Date
MoNTE48 0dbf454870 Fix some warnings 2019-10-11 20:21:22 +02:00
Maksim Gamarnik 35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
paramat e45af9e0b7 Mapgen files: Update and correct copyright credits 2017-05-26 20:46:03 +01:00
Dániel Juhász fe21088bca Light calculation: New bulk node lighting code
This commit introduces a new bulk node lighting algorithm to minimize
lighting bugs during l-system tree generation, schematic placement and
non-mapgen-object lua voxelmanip light calculation.

If the block above the changed area is not loaded, it gets loaded to avoid
lighting bugs.
Light is updated as soon as write_to_map is called on a voxel manipulator,
therefore update_map does nothing.
2017-03-11 02:06:18 +00:00
Maksim Gamarnik e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02: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
Loic Blot 17bad192fe Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd

Other improvements:

* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
2016-10-05 10:53:19 +02:00
Maksim Gamarnik 0b19e56113 Merge remote-tracking branch 'upstream1/master' 2016-04-01 00:33:55 +03:00
est31 e278077afa mg_schematic: fix leak in lua API, and small cleanup
* Fix leak like behaviour if you load multiple schematics in a loop.

* Cleanup check in for, fixing theoretical out of bounds read if
	Schematic::deserializeFromMts reduced the number of elements
	in m_nodenames. A != check may need an overflow of the counter
	before it hits, if origsize is larger than m_nodenames.size().

* Fix function name passed to errorstream: it was wrong. Also use
	__FUNCTION__ instead of manually using the method name at other
	places in the function.

* Don't shadow the name member in the loop.
2016-03-30 16:26:05 +02:00
Maksim Gamarnik bcf249297c Merge last Minetest commits 2015-11-10 20:29:00 +02:00
kwolekr d93a706ccb Schematics: Add core.place_schematic_on_vmanip API
Fix memory leak in minetest.place_schematic
Slightly refactor Schematic code
2015-11-05 01:18:32 -05:00
paramat 6e54aa7492 Mapnode: Replace rotateAlongYAxis with improved version
Get facedir by using lowest 5 bits of param2 and limiting to 23
More robust, frees up higher param2 bits for other uses
Change lookup table and table index to u8
2015-10-02 06:03:36 +01:00
paramat 7ac5989c12 Mapnode: Add rotateAlongYAxisFull supporting 24 facedirs 2015-09-22 20:54:25 +01:00
Maksim Gamarnik 9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
kwolekr e12ad0007b Schematics: Fix probability values for .mts version 1 2015-05-31 23:16:19 +10:00
kwolekr e8eaf0bb90 Schematics: Fix probability values for .mts version 1 2015-05-15 16:20:30 -04:00
kwolekr 19f7ff2ac8 Schematics: Add per-node force placement option 2015-05-13 17:01:54 +10:00
kwolekr e0fde4ed5f Tests: Add schematic unittests
Improve schematic file-saving interface
Add ability to create temporary test files
2015-05-13 17:01:33 +10:00
kwolekr 4d5237fc9f Schematics: Add indent-with-space option for schematic Lua table serialization 2015-05-13 17:01:19 +10:00
kwolekr ab896a72b3 NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-13 17:01:16 +10:00
kwolekr 4a54c965a5 Schematics: Add per-node force placement option 2015-05-09 18:44:00 -04:00
kwolekr 9f679f6b11 Tests: Add schematic unittests
Improve schematic file-saving interface
Add ability to create temporary test files
2015-05-08 00:55:42 -04:00
kwolekr 097b9ead50 Schematics: Add indent-with-space option for schematic Lua table serialization 2015-05-07 02:54:35 -04:00
kwolekr e8fb94705c NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
est31 ab6a6cc1bb Fix build since: "Remove referenced schematics from Decorations on clear"
Fixes build, which has been broken for all platforms (except BSD?) since
grandparent 406d9ba87b9f6e57b86c6282bf157e3341aa195c.
Thanks to @SmallJoker for pointing out a solution.
2015-04-17 10:30:59 +02:00
kwolekr b89d87e3cb Schematics: Remove referenced schematics from Decorations on clear 2015-04-17 00:53:05 -04:00
est31 40340c5162 Fix build for < C++11 since last commit
Build broke since last commit 479f38973e13680d6a39d9c2a7f29fd330b67d41 for compilers not supporting C++11.
Pre C++11, the constructor of std::ifstream only allows C like strings.
2015-04-17 02:34:02 +02:00
kwolekr 737d4078c9 Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager.  In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution.  So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
2015-04-16 16:27:05 -04:00
kwolekr 4c5f712673 Schematics: Reorganize (de)serialization and add Lua serialization API 2015-04-13 03:10:52 -04:00
kwolekr ae55a60e16 GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-31 01:11:51 -04:00
kwolekr 2d4629c01d Schematics: Error if unable to open file 2015-03-23 22:22:14 -04:00
Craig Robbins 27791ee1aa For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
kwolekr 02e06b423e Shorten ManualMapVoxelManipulator to MMVManip 2015-01-05 02:42:27 -05:00
kwolekr b68dcb323d Set fallback content if resolving content vector requires everything 2014-12-27 22:20:04 -05:00
kwolekr 2aa53ba603 Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
kwolekr 2906d0620b Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -05:00
Craig Robbins 6122c750b4 Fix compiler warning (signed vs. unsigned) 2014-12-08 23:00:49 +10:00
kwolekr 4ac2fcc936 Schematics: Fix minetest.place_schematic() when defined by a Lua table 2014-12-06 18:39:05 -05:00
kwolekr bb5f0e46bd Add Generator Element Management framework
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
2014-11-12 23:02:41 -05:00
kwolekr 08068ac0c6 Split up mapgen.cpp 2014-11-01 13:16:23 -04:00