| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
* Add zstd support.
* Rearrange serialization order
* Compress entire mapblock
Co-authored-by: sfan5 <sfan5@live.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Finish getNode cleanup
|
|
|
|
|
|
|
|
|
|
| |
MapBlock::deSerializeNetworkSpecific() (#8122)
* Fix warning about dungeongen.cpp memcpy()
* Fix unused variable in MapBlock::deSerializeNetworkSpecific()
* Fix unused variable a simpler way
|
|
|
|
|
| |
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
|
|
|
|
|
| |
Update Android.mk
Remove 'src/client' from include_directories
|
|
|
| |
Use sizeof where applicable for mt_snprintf
|
|
|
|
|
|
|
|
|
| |
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
|
|
|
| |
Also remove the unit test that tests the removed algorithms.
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize various files (src/m*)
* range-based for loops
* code style
* C++ headers instead of C headers
* Default operators
* empty function
Thanks to clang-tidy
|
| |
|
| |
|
|
|
|
| |
don't check isLightDayNightEq if checked on previous node
|
|
|
|
|
|
| |
correctBlockNodeIds does 2 lookups for each loaded node, one to translate DB ID to name and a second to translate name to real ID. Name to real ID is very consumming if done on every node. As mapblocks are in most cases composed of many identical adjacent nodes, cache previous source and destination id and use them on the next node to prevent any lookup on those maps.
This reduce the function load from 15% of my CPU usage to ~0.7%, on the test, calls was reduced from 2.5M lookups to 42k lookups, it's a huge performance gain
|
| |
|
|
|
|
| |
+ C++11 codestyle
|
|
|
|
| |
We don't write in correct buffer size in analyze_block
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
This reverts commit 599e13e95e81aadb959c9f3715aec9b425ede084.
|
| |
|
|
|
|
| |
* Private node metadata that isn't sent to the client
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
This commit updates mapblocks' light if necessary when they are loaded.
This removes ghost lighting.
|
|
|
|
| |
Instead of redefining them everywhere.
|
|
|
|
| |
These names are reserved for the compiler/library implementations.
|
|
|
|
| |
Remove DTIME macro and its uses, too
|
|
|
|
|
|
|
|
|
|
| |
-> Don't pass pointer to whole IGameDef to NodeMetadata constructors
and deserializers, but only to IItemDefManager, which is needed
-> Remove the unused content_mapnode_get_new_name() method
-> Fix style for MapBlock::deSerialize and MapBlock::deSerialize_pre22,
improving accuracy of error messages a bit
-> Fix style at other serialisation methods too
-> Improve accuracy of some comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename everything.
* Strip J prefix.
* Change UpperCamelCase functions to lowerCamelCase.
* Remove global (!) semaphore count mutex on OSX.
* Remove semaphore count getter (unused, unsafe, depended on internal
API functions on Windows, and used a hack on OSX).
* Add `Atomic<type>`.
* Make `Thread` handle thread names.
* Add support for C++11 multi-threading.
* Combine pthread and win32 sources.
* Remove `ThreadStarted` (unused, unneeded).
* Move some includes from the headers to the sources.
* Move all of `Event` into its header (allows inlining with no new includes).
* Make `Event` use `Semaphore` (except on Windows).
* Move some porting functions into `Thread`.
* Integrate logging with `Thread`.
* Add threading test.
|
|
|
|
| |
on runtime
|
| |
|
|
|
|
|
|
|
|
| |
* Use enum for GENERIC_CMD_*
* Rename m_attachements to attachement_parent_ids (public member and clearer name)
* Rename GENERIC_CMD_SET_ATTACHMENT to GENERIC_CMD_ATTACH_TO
* USHRT_MAX + 1 buffer sizes to prevent overflows as @kahrl suggested
* Remove unneccessary m_id from GenericCAO (shadowing protected superclass member for no reason) as @kahrl suggested
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
@celeron55
Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
command 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"
nerzhul is (may?) be working on a new solution. For the moment this is reverted because old worlds cannot be loaded (see discussion on github for the commit).
This reverts commit 800d19270250bb13cc6b2d330199815bf8e96446.
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
mapping array
|
| |
|
| |
|
|
|
|
| |
The real problem was that MapBlocks were not activated before getting sent to the client
|