Commit Graph

198 Commits

Author SHA1 Message Date
Craig Robbins ced6d20295 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
Craig Robbins caf8d2a9d1 Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok @celeron55
Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
2015-02-10 16:23:37 +01:00
Loic Blot 80a7408e4d Fix a crash (assert) when client set serial version < 24 in INIT
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-27 16:55:25 +01:00
Craig Robbins ca217d0416 Revert "Fix a crash (assert) when client set serial version < 24 in INIT 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 800d192702.
2015-01-27 00:39:33 +10:00
(@U-Exp) 800d192702 Fix a crash (assert) when client set serial version < 24 in INIT 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 2015-01-24 22:41:02 +10:00
kwolekr 38bd9e93a2 Fix all warnings and remove -Wno-unused-but-set cflag 2015-01-18 23:29:19 -05:00
Craig Robbins 5b8855e83c Remove most exceptions from getNode() (and variants) 2014-11-14 18:05:34 +10:00
sapier 5d06bdf8ac Speedup getBlockNodeIdMapping by up to factor 4 by using a fixed size mapping array 2014-06-23 00:13:41 +02:00
proller 0279f32db7 Remove liquid_finite and weather 2014-04-18 21:56:48 +04:00
sapier 04e9a9d541 Cleanup jthread and fix win32 build 2013-12-01 16:25:46 +01:00
kwolekr e396fb2984 Actually fix weather
The real problem was that MapBlocks were not activated before getting sent to the client
2013-11-17 01:59:04 -05:00
kwolekr 9bccd75e34 Weather: Clean up getHeat/getHumidity somewhat 2013-09-16 23:33:53 -04:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
proller 06cdce1e12 Weather backward compatibility 2013-08-02 00:51:36 +04:00
PilzAdam ff7c380d0e Fix warnings in mapblock.cpp 2013-07-28 23:34:58 +02:00
proller 3aedfac968 Weather support 2013-07-27 23:21:48 +04:00
Ilya Zhuravlev 6a1670dbc3 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola eca1c96412 Move util/serialize.h out from staticobject.h for smaller header dependencies 2012-11-26 11:18:34 +02:00
Perttu Ahola ee2d9d973a Reorganize ClientMap rendering code for a bit more performance
- Don't select blocks for drawing in every frame
- Sort meshbuffers by material before drawing
2012-09-04 22:41:03 +03:00
Perttu Ahola 5c31445117 Improve node timer format (map format version 25) and update mapformat.txt 2012-07-24 15:03:46 +03:00
Perttu Ahola fd845f27f5 Fix map deserialization and remove old serialization code 2012-07-23 08:18:39 +03:00
darkrose ea62ee4b61 Increase node id/param0 to 16 bits, leaving param2 always with 8 bits 2012-07-23 08:18:39 +03:00
darkrose cd6becd442 Implement node timers 2012-07-23 08:18:37 +03:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola e74668ef7f Update and fix doc/mapformat.txt; make current format more solid in mapblock.cpp 2012-06-08 14:57:02 +03:00
Perttu Ahola 037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola f48882213e Add ignore_world_load_errors configuration option and provide better error messages 2012-06-04 22:34:40 +03:00
Kahrl 704782c95b WIP node metadata, node timers 2012-06-03 22:31:00 +03:00
Perttu Ahola 02c035c548 Reduce EnvRef:set_node() time tenfold by postponing the dayNightDiff update until it is actually needed 2012-03-29 00:28:48 +03:00
Kahrl 807a0d313b MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints 2012-03-15 21:45:44 +02:00
Kahrl c241902b40 Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix legacy_wallmounted 2012-01-22 17:31:20 +02:00
Kahrl 157a4cf18c Node placement / mineral / serialization / iron freq / node_dig callback
- 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-22 17:24:50 +02:00
Kahrl 6a76c226e1 The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef 2012-01-12 06:10:39 +01:00
Perttu Ahola 842eb5da28 Replace old active block random node modifying things with actual ActiveBlockModifiers 2011-11-29 19:13:56 +02:00
Perttu Ahola 1b765b9740 Add reason parameter to setModified and print it out to verbosestream when saving block 2011-11-29 19:13:49 +02:00
Perttu Ahola df8346ef4d Do not expose CONTENT_* stuff in content_mapnode.h and use a name converter wrapper in old code 2011-11-29 19:13:47 +02:00
Perttu Ahola c0f6395cf0 Node definition names 2011-11-29 19:13:46 +02:00
Perttu Ahola 3318d0b4b8 Remove content dependencies from mapblock.cpp 2011-11-29 19:13:46 +02:00
Perttu Ahola c6fd2986d4 GameDef compiles 2011-11-29 19:13:42 +02:00
Perttu Ahola abceeee92f Create framework for getting rid of global definitions of node/tool/item/whatever types 2011-11-29 19:13:41 +02:00
Perttu Ahola 3b77a63d5d Allocate MapBlock::m_node_metadata on heap to allow less header bloat 2011-11-29 19:13:41 +02:00
Perttu Ahola 64996422c0 Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuff 2011-11-29 19:13:40 +02:00
Perttu Ahola 43a28f04fa mobv2 2011-10-15 02:28:57 +03:00
Perttu Ahola b60b58b627 Saner block modification flag operation for not saving everything always 2011-10-12 10:53:37 +03:00
Perttu Ahola 416499f978 fix server build 2011-07-25 23:31:02 +03:00
Perttu Ahola 29d905f98a Added a mapblock analyzing function for debugging use and fixed remaining mapgen bugs 2011-07-24 12:09:33 +03:00
Perttu Ahola 112b85d0fb merged fix to decapitated trees; other bugs now exists 2011-07-24 11:39:13 +03:00
Perttu Ahola 90d793f8f3 extended content-type range 2011-07-23 16:55:26 +03:00
Perttu Ahola 52ad5944c0 Attempt to fix the big bug. Now server either stops sending map or mapgen starts generating CONTENT_IGNORE. 2011-07-21 17:00:08 +03:00
Perttu Ahola 8f742855a1 initial steps in doing content type extension 2011-07-02 01:07:54 +03:00
Perttu Ahola 3fccc67eb7 fixed block unloading from memory (a better fix coming next) 2011-06-26 21:53:11 +03:00
Perttu Ahola 2915bd5518 more reorganizing of map code 2011-06-26 01:31:43 +03:00
Perttu Ahola 7538b4c620 New map generator added (and SQLite, messed up the commits at that time...) (import from temporary git repo) 2011-06-25 04:25:14 +03:00
Perttu Ahola 5ac900ddd9 Changed MapBlockObjects to be never written anymore. Incremented version number. 2011-06-18 15:16:35 +03:00
Perttu Ahola 682c9d8e7d Moved stuff from mapblock{h,cpp} to mapblock_mesh.{h,cpp} and content_mapblock.{h,cpp} 2011-06-17 23:20:31 +03:00
Perttu Ahola dc5319b6c9 Moved some mapnode content stuff from mapnode.{h,cpp} and digging property stuff from material.cpp to content_mapnode.{h,cpp} 2011-06-17 22:20:15 +03:00
Perttu Ahola a649d43fe7 Messed around with genmap.py. Now supports format version 17. 2011-06-05 00:10:06 +03:00
Perttu Ahola 75f3e68451 Merged CiaranG's fence graphic updates (ugh, well, it worked, i guess, kind of.) This commit should also get rid of multiple heads on the server. 2011-06-02 02:37:49 +03:00
Ciaran Gultnieks 06427e355a Slightly better texture coordinates for fences 2011-05-31 10:12:51 +01:00
Perttu Ahola 223b379348 Reduced the CPU usage of the sent block selector algorithm 2011-05-31 00:15:43 +03:00
Ciaran Gultnieks 10cf6c3f6d Ability to set texture coordinates on a generated cuboid (for fences)
Note: can't test this properly yet - may be fixes to follow

--HG--
extra : rebase_source : e2d41621018f886d340c7847b29240042d4412ac
2011-05-30 18:38:46 +01:00
Ciaran Gultnieks c5e583e059 Added fences (but still needs an icon or something to display in inventory) 2011-05-24 17:52:04 +01:00
Perttu Ahola 0af5311538 Preliminary "active block" stuff + set up test code to grow grass. 2011-05-22 17:00:09 +03:00
Ciaran Gultnieks 2e1a69c3b1 Added glass, with rendering and furnace support. 2011-05-09 19:22:07 +01:00
Perttu Ahola 59c4a342a9 Fixed a temporary solution of server shutting down to an assert(0) when a too large block metadata is sent to an old client 2011-05-03 17:33:51 +03:00
Perttu Ahola 6edb8c567c Tuned polygon generation to sort the triangles for nicer gradients 2011-04-24 21:54:04 +03:00
Perttu Ahola f2349ec5df ...Now the tesselation should actually work 2011-04-24 21:18:25 +03:00
Perttu Ahola 2704bdc68e Optimized smooth lighting calculation code 2011-04-24 21:15:50 +03:00
Perttu Ahola ba88685fab cleaned the smooth lighting code a bit 2011-04-24 14:19:35 +03:00
Perttu Ahola 79799840a2 disable tiling of textures only if smooth lighting is used 2011-04-24 12:39:33 +03:00
Perttu Ahola b21c7de3ed Added a setting for disabling smooth lighting. Updated changelog. 2011-04-24 12:31:19 +03:00
Perttu Ahola 8c1f7a0dd2 Added a simple software "ambient occlusion" effect, like minecraft's "smooth lighting" 2011-04-24 11:41:33 +03:00
Perttu Ahola bda4681242 fixed flowing water lighting when it is below a solid block 2011-04-23 16:01:32 +03:00
Perttu Ahola b36e5c0508 Removed IrrlichtWrapper 2011-04-22 09:54:05 +03:00
Perttu Ahola c638442e78 Some work-in-progress in hp and mobs and a frightening amount of random fixes. 2011-04-21 19:35:17 +03:00
Perttu Ahola 50a8087684 support for format 0 and 1 maps 2011-04-11 16:58:49 +03:00
Perttu Ahola 5a4d8ffad3 implemented rats in new system to verify that it works 2011-04-10 15:16:27 +03:00
Perttu Ahola 389fe31ace changed node metadata format to better accomodate future needs and problems 2011-04-05 00:24:47 +03:00
Perttu Ahola a9f89fb3fb now the server builds 2011-04-04 05:25:55 +03:00
Perttu Ahola fa736e138c fully implemented the sign with the new framework 2011-04-04 05:12:33 +03:00
Perttu Ahola 2f466726e6 Made a proper queued thread to client for handling some block mesh updates. Also made client mutex-free to allow easier adding of new stuff. 2011-04-04 02:05:12 +03:00
Perttu Ahola e0f7bd4d57 Modified block mesh generation to have clearer input and output. Instead of being a messy object oriented cludge, it now is a messy cludge with separate parameters. 2011-04-03 19:50:54 +03:00
Perttu Ahola 01c2b003e1 commit before some more radical changes 2011-04-03 16:21:06 +03:00
Perttu Ahola ee89e29ae1 Revert mapgen to best working version (2) 2011-04-03 12:14:23 +03:00
Perttu Ahola bc66bb2d40 Mapgen is better now. Not a lot, but a bit! 2011-04-02 20:55:22 +03:00
Perttu Ahola c8be58a65c A third try on terrain generation. No trees yet. 2011-02-28 02:01:40 +02:00
Perttu Ahola c57637b4c3 Temporary commit; lots of test code and stuff 2011-02-21 00:45:14 +02:00
Perttu Ahola 4c2b9ed516 random code cleaning, shouldn't affect anything 2011-02-18 22:25:25 +02:00
Perttu Ahola d065bae323 Ctrl+C handling on POSIX, some commands for server and other tweaking 2011-02-15 16:11:24 +02:00
Perttu Ahola 7701753131 removed useless SMaterial parameter from mapblock 2011-02-14 16:12:38 +02:00
Perttu Ahola 0386279b6f changed sky color and made new style leaves a bit more bright 2011-02-13 14:21:31 +02:00
Perttu Ahola 21372749f5 now it works nicely 2011-02-11 20:37:54 +02:00
Perttu Ahola 52d99fef31 fully working i guess 2011-02-11 19:55:42 +02:00
Perttu Ahola 804b2647ce new texture stuff quite working 2011-02-11 16:43:26 +02:00
Perttu Ahola 841ac10e5c fixes toward mingw compatibility 2011-02-10 15:55:15 +02:00
Perttu Ahola 1704badc30 work-in-progress texture atlas optimization 2011-02-10 02:13:03 +02:00
Perttu Ahola dd9e82f5bc bug-fixin' 2011-02-08 01:12:55 +02:00
Perttu Ahola ea6740e900 mapgen stuff 2011-02-05 14:55:16 +02:00