| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
| |
See #7555
Cache (up to 64) node types for each active block.
Check this cache first to see whether any ABM needs to be triggered for a block.
|
|
|
| |
Also remove the unit test that tests the removed algorithms.
|
|
|
|
| |
* Move files around
|
|
|
|
|
| |
This bug can be triggered by e.g. calling minetest.place_schematic()
and stopping the server immediately afterwards.
|
|
|
|
|
|
|
|
|
| |
* empty function
* default constructor/destructor
* remove unused Map::emergeSector(a,b)
* for range-based loops
* migrate a dirs[7] table to direction tables
* remove various old unused function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Optimize headers (part 2)
* less debug.h in headers
* less remoteplayer.h for everybody
* Cleanup (part 2)
* camera.h: mesh.h
* mapgen.h: mapnode.h
* serverenvironment.h: mapblock.h
* nodedef.h: shader.h
|
|
|
|
| |
* Migrate cpp headers to pragma once
|
|
|
|
|
|
|
|
|
|
| |
* C++11 patchset 10: continue cleanup on constructors
* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)
* More classes cleanup
* More classes cleanup + change NULL tests to boolean tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB).
New profiler stats:
- MeshUpdateQueue MapBlock cache hit %
- MeshUpdateQueue MapBlock cache size kB
Removes one type of stutter that was seen on the client when received MapBlocks
were being handled. (the "MeshMakeData::fill" stutter)
Kind of related to at least #5239
Originally preceded by these commits, now includes them:
- Move the mesh generator thread into src/mesh_generator_thread.{cpp,h}
- mesh_generator_thread.cpp: Update code style
- MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits.
- MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The setting limits map generation but affects nothing else.
Add 'mapgen_limit' to global mapgen parameters.
Move 'blockpos_over_mapgen_limit()' to the only place it is called
from: map.cpp.
Allow teleportation to any part of the world even if over the set
mapgen limit.
Simplify the reading of this limit in mgvalleys.
Remove the 'map_generation_limit' setting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation applied the setting to blockpos_over_limit(),
objectpos_over_limit() and in createSector(), causing many bugs near the
world edge.
First revert the previous implementation.
Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity.
Add a new function to mapblock.h called blockpos_over_mapgen_limit() that
checks against the map_generation_limit setting, and call this only from
the code that decides where mapgen stops.
Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the
chance of bugs, there is no need to use map_generation_limit here.
|
|
|
|
|
|
|
|
|
|
| |
* Update server min protocol version to v24
It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt
v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14
* Drop protocol v23 and lesser code
|
|
|
|
|
|
|
|
|
|
| |
Reduce the object limit by mapblock size, to avoid objects being
added just inside the map generation limit but in a block and sector
that extend beyond the map generation limit.
Change notification of 'objectpos over limit' from red in-chat ERROR
to in-terminal only WARNING, since this will happen often using mob
mods near the world's edge.
|
|
|
|
|
| |
This commit updates mapblocks' light if necessary when they are loaded.
This removes ghost lighting.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the maths that check if any part of a mapblock or sector is over the
set map_generation_limit.
Therefore avoid the loading of any over-limit blocks that were previously
generated when map_generation_limit was larger. The set limit can vary
for a world because it is not yet a per-world mapgen parameter, even when
it is sometimes it will be changed deliberately.
Therefore avoid a player being returned to world centre if they re-enter
a world while being over-limit.
Fix the createSector() crash caused by a mob spawning over-limit in an
over-limit mapblock
|
| |
|
| |
|
|
|
|
|
| |
Borders have to be converted into BS format in order to be accurately comparable to
object positions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Entity positions are serialized as F1000. Disallow placing
entities outside safe borders with the minetest.add_entity
call.
Note that this patch only enforces those boundaries for
placing entities, moving entities that move outside boundaries
aren't affected.
Thanks to @nanepiwo for pointing this out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Do two renames:
* SER_FMT_CLIENT_VER_LOWEST -> SER_FMT_VER_LOWEST_WRITE
* SER_FMT_VER_LOWEST -> SER_FMT_VER_LOWEST_READ
Now the two define values are consistently named with the _WRITE defines
SER_FMT_VER_{HIGHEST,LOWEST}_WRITE, and to better point out what the two
serialisation versions actually are for.
2. wrap some lines in doc/worldformat.txt, and point out that the node
timers are serialized at a later point, as this can cause confusion about
what now happens (if one doesn't strictly read the if block's conditions).
3. some whitespace fixes in NodeTimerList::serialize, and one new comment.
|
| |
|
|
|
|
| |
on runtime
|
|
|
|
|
|
|
| |
Spare direct multoplication, use constant MapBlock::nodecount instead of
local nodecount variables.
Also use strides at one place instead of multiplications.
|
|
|
|
|
| |
This improves performance of MapBlock::raiseModified by a factor of 6.
Also, clean up mapblock.h a bit and inline small functions.
|
|
|
|
| |
NDEBUG is defined), replace those usages with persistent alternatives
|
|
|
|
|
|
| |
Map::timerUpdate and ServerMap::save().
This will speedup the loop reading into those functions
|
|
|
|
|
|
|
|
|
| |
When SER_FMT_VER_LOWEST is set to zero, then the test is stupid in INIT because all client works. In mapblock we check if client's serialization version is < 24, but if client sent serialization version < 24 (15 for example) the server set it and tried to send nodes, then BOOM
To resolve the problem:
* Create a different CLIENT_MIN_VERSION to handle this problem
* Remove the exception
* Use an assert in case of bad developer code
|
|
|
|
|
|
|
| |
Change must_reflow to a deque
Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement.
Comment out unused variable
Optimisations to block offset calculations
|
| |
|
| |
|
| |
|
|
|
|
| |
The real problem was that MapBlocks were not activated before getting sent to the client
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Don't select blocks for drawing in every frame
- Sort meshbuffers by material before drawing
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
GPLv2/later, by agreement of major contributors
|
| |
|