Commit Graph

14 Commits

Author SHA1 Message Date
lhofhansl d1624a5521
Switch MapBlock compression to zstd (#10788)
* Add zstd support.
* Rearrange serialization order
* Compress entire mapblock

Co-authored-by: sfan5 <sfan5@live.de>
2021-08-31 17:32:31 -07:00
Treer 963fbd1572
Fix access violation in create_schematic() (#11534)
fixes #11533

Schematics saved from y locations greater than 0 would cause an access violation if layer probabilities were specified
2021-08-16 17:55:35 +02:00
SmallJoker 05719913ac
Schematic: Properly deal with before/after node resolving and document (#11011)
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration).
Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
2021-03-20 13:02:15 +01:00
Lars e638056523 Allow configuring block disk and net compression. Change default disk level. 2020-12-15 10:15:25 -08:00
SmallJoker 947466ab28 (se)SerializeString: Include max length in the name
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-10-01 09:52:59 +02:00
sfan5 c28fbd06a8 Fix remaining issues with mapgen scriptapi 2020-05-05 19:26:59 +02:00
sfan5 3c65d1acec Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copy 2020-05-05 19:26:59 +02:00
sfan5 2062c80e21 Allow ObjDefManager instances to be cloned 2020-05-05 19:26:59 +02:00
SmallJoker 26b39f1eae
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak)
Map::dispatchEvent: Allocation safety using references
2019-09-24 19:05:28 +02:00
Paramat 922e6ff57e
blitToVManip: Check out-of-bounds using node position not index (#8127)
Previously, when using 'place on vmanip' to add a schematic to a
lua voxelmanip, if part of the schematic was outside the voxelmanip
volume, the outside part would often appear in a strange place
elsewhere inside the voxelmanip instead of being trimmed off.
This was due to the out-of-bounds check checking the index.

A position outside the voxelmanip can have an index that satisfies
'0 <= index <= voxelmanip volume', causing the node to be placed
at a strange position inside the voxelmanip.

Use 'vm->m_area.contains(pos)' instead.
Move index calculation to later in the code to optimise.
2019-01-25 19:01:00 +00:00
paramat c610643c4c Place schematic (on vmanip): Enable use of 'place center' flags
For 'place schematic' and 'place schematic on vmanip' APIs.
Fix 'place center' code to properly centre schematics.
Fix some comments.
2018-02-27 19:39:05 +00:00
Dániel Juhász 3face01a20 Node definition manager refactor (#7016)
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
2018-02-10 21:04:16 +01:00
paramat 142474196a Mapgen folder: Update and improve copyright information of files 2018-01-15 04:42:08 +00:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00