aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
AgeCommit message (Collapse)Author
2017-03-19Update server min protocol version to v24 (#5411)Loïc Blot
* 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
2017-02-13Lighting: Update lighting at block loadingDániel Juhász
This commit updates mapblocks' light if necessary when they are loaded. This removes ghost lighting.
2016-12-24Move PP() and PP2() macros to basic_macros.hRogier
Instead of redefining them everywhere.
2015-10-14Rename macros with two leading underscoresShadowNinja
These names are reserved for the compiler/library implementations.
2015-10-14Use warningstream for log messages with WARNINGShadowNinja
Remove DTIME macro and its uses, too
2015-09-19Various style cleanups + unused code removalest31
-> 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
2015-09-14Serialisation: documentation fixes, clarifying renames and whitespace fixesest31
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.
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* 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.
2015-07-29Precalculate mapblock relative size. This permit to remove many s16 calculs ↵nerzhul
on runtime
2015-07-10Misc. minor fixeskwolekr
2015-06-20Generic CAO cleanups and renames for clarificationest31
* 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
2015-05-31Mapblock: nodecount refactorest31
Spare direct multoplication, use constant MapBlock::nodecount instead of local nodecount variables. Also use strides at one place instead of multiplications.
2015-05-17Record MapBlock modification reasons as flags instead of stringskwolekr
This improves performance of MapBlock::raiseModified by a factor of 6. Also, clean up mapblock.h a bit and inline small functions.
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-02-10Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok ↵Craig Robbins
@celeron55 Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
2015-01-27Fix a crash (assert) when client set serial version < 24 in INITLoic Blot
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
2015-01-27Revert "Fix a crash (assert) when client set serial version < 24 in INIT ↵Craig Robbins
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.
2015-01-24Fix a crash (assert) when client set serial version < 24 in INIT command ↵(@U-Exp)
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
2015-01-18Fix all warnings and remove -Wno-unused-but-set cflagkwolekr
2014-11-14Remove most exceptions from getNode() (and variants)Craig Robbins
2014-06-23Speedup getBlockNodeIdMapping by up to factor 4 by using a fixed size ↵sapier
mapping array
2014-04-18Remove liquid_finite and weatherproller
2013-12-01Cleanup jthread and fix win32 buildsapier
2013-11-17Actually fix weatherkwolekr
The real problem was that MapBlocks were not activated before getting sent to the client
2013-09-16Weather: Clean up getHeat/getHumidity somewhatkwolekr
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-08-02Weather backward compatibilityproller
2013-07-28Fix warnings in mapblock.cppPilzAdam
2013-07-27Weather supportproller
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-11-26Move util/serialize.h out from staticobject.h for smaller header dependenciesPerttu Ahola
2012-09-04Reorganize ClientMap rendering code for a bit more performancePerttu Ahola
- Don't select blocks for drawing in every frame - Sort meshbuffers by material before drawing
2012-07-24Improve node timer format (map format version 25) and update mapformat.txtPerttu Ahola
2012-07-23Fix map deserialization and remove old serialization codePerttu Ahola
2012-07-23Increase node id/param0 to 16 bits, leaving param2 always with 8 bitsdarkrose
2012-07-23Implement node timersdarkrose
2012-06-17Properly and efficiently use split utility headersPerttu Ahola
2012-06-08Update and fix doc/mapformat.txt; make current format more solid in mapblock.cppPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-06-04Add ignore_world_load_errors configuration option and provide better error ↵Perttu Ahola
messages
2012-06-03WIP node metadata, node timersKahrl
2012-03-29Reduce EnvRef:set_node() time tenfold by postponing the dayNightDiff update ↵Perttu Ahola
until it is actually needed
2012-03-15MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric ↵Kahrl
light, removed footprints
2012-01-22Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix ↵Kahrl
legacy_wallmounted
2012-01-22Node placement / mineral / serialization / iron freq / node_dig callbackKahrl
- Node placement code moved to Lua - Mineral system removed (added default:stone_with_coal and default:stone_with_iron). - MapBlock and MapNode serialization updated. - Mapgen: Frequency of iron increased. - node_dig callback and related changes.
2012-01-12The huge item definition and item namespace unification patch (itemdef), see ↵Kahrl
http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
2011-11-29Replace old active block random node modifying things with actual ↵Perttu Ahola
ActiveBlockModifiers