Commit Graph

138 Commits

Author SHA1 Message Date
Auke Kok 47464c9344 Fix backface culling when connecting to new servers.
Introduce a new contentfeatures version (8). When clients
connect using v27 protocol version, they can assume that
the tiledef.backface_culling is trustable, but if clients
connect to servers providing contentfeatures version 7,
then the v27 clients know that backface culling settings
provided by the server in tiledefs are bogus for mesh,
plantlike, firelike or liquid drawtype nodes.

thanks to hmmmm, est31, nerzhul.

Tested on new client - new server, new client - old server
old client - new server.
2016-02-10 00:10:51 +01:00
Auke Kok 735e3b7059 Backface culling: Ignore setting in tiledef from old servers.
Outdated servers are always sending tiledefs with culling
enabled no matter what, as the value was previously entirely
ignored.

To compensate, we must (1) detect that we're running against
an old server with a new client, and (2) disable culling for
mesh, plantlike, firelike and liquid draw types no matter what
the server is telling us.

In order to achieve this, we need to bump the protocol version
since we cannot rely on the tiledef version, and test for it
being older. I've bumped the protocol version, although that
should have likely happened in the actual change that introduced
the new backface_culling PR #3578. Fortunately that's only 2
commits back at this point.

We also explicitly test for the drawtype to assure we are not
changing the culling value for other nodes, where it should
remain enabled.

This was tested against various pub servers, including 0.4.13 and
0.4.12.

Fixes #3598
2016-01-23 16:33:24 +01:00
paramat 0bbbc6e13d Liquids: Flow into and destroy 'floodable' nodes
Add new node property 'floodable', default false
Define "air" as floodable = true in C++ and lua
2016-01-07 05:57:19 +00:00
est31 b0523adc5f Add new ContentParamType2 "CPT2_DEGROTATE"
This might break some mods, but it is important for all uses of the param2 to
be documented.

This doesn't need a serialisation version or network protocol version change,
as old clients will still work on new servers, and it is bearable to have
new clients getting non rotated plants on old servers.
2015-10-04 23:59:41 +02:00
RealBadAngel 655fc6010f Fix relief mapping issues 2015-07-16 15:36:48 +02:00
RealBadAngel ffd16e3fec Add minimap feature 2015-06-27 03:42:01 +02:00
rubenwardy 603297cc35 Add texture overriding 2015-05-19 21:27:07 +02:00
kwolekr f091bbd563 Fix compilation for non-client builds, and fix signed comparison warning 2015-05-08 01:21:34 -04:00
kwolekr 656575b59d NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
kwolekr 633af58a05 NodeDefManager: Improve const-correctness of interfaces
- Add ability to explicitly reset NodeResolve state (useful for unittesting)
- Remove non-essential NodeResolve methods modifying state from INodeDefManager
- Add const qualifier to NodeDefManager and ContentFeatures serialize
2015-05-05 16:52:06 -04:00
kwolekr 479f38973e Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager.  In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution.  So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
2015-04-16 16:27:05 -04:00
kwolekr 26153bab7d Revert "Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp"
This reverts parts of commit 9749d9fee6, which breaks node resolver
list clearing
2015-03-20 18:41:26 -04:00
est31 e4f7c92cff Finer progress bar updates when initializing nodes
The bar is only drawn when the user will notice a change, which prevents time overheads that this commit would cause, resulting from useless draws.
2015-03-15 22:01:52 +10:00
Loic Blot 9749d9fee6 Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap
* Remove disabled code in ClientMap::renderMap, disabled since a long time
2015-03-05 15:36:20 +01:00
Loic Blot 0d1eedcccc Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/ 2015-03-05 11:59:40 +01:00
kwolekr cd4d213ae0 NodeResolver: Perform callback immediately if node registration phase finished
Also add NodeResolver callbacks on the client
2015-01-04 16:32:31 -05:00
kwolekr 6fdb32361a Remove freezemelt (the remainder of proller nonsense) 2015-01-04 03:30:10 -05:00
kwolekr d91559b8f0 Fix crash if NodeResolver destroyed before pending any node resolutions 2015-01-03 11:05:31 -05:00
kwolekr 08d259cf41 Set fallback content if resolving content vector requires everything 2014-12-27 22:20:04 -05:00
kwolekr b67f37f27e Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
kwolekr 2c9bbe2736 NodeResolver: Fix some comments and use const references for params 2014-12-12 14:21:41 -05:00
kwolekr c07f15e910 NodeResolver: Fix cancelNode and cancelNodeList 2014-12-11 00:41:54 -05:00
kwolekr 1cb6ea6346 Refactor decoration-related code
Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
2014-10-29 01:56:37 -04:00
kwolekr 4a3592ff9a Add NodeResolver documentation
Set content to fallback on AddNode failure
Consider node list requests with no results as failed
2014-10-28 02:23:45 -04:00
kwolekr d274cbfce6 Add NodeResolver and clean up node name -> content ID resolution system 2014-10-26 23:55:45 -04:00
RealBadAngel e5652cb75c Custom collision boxes node property. 2014-10-19 20:48:21 +02:00
RealBadAngel 0066bd77d2 Add meshnode drawtype. 2014-10-18 16:42:23 +02:00
BlockMen f48f686930 Add optional framed glasslike drawtype 2014-10-02 11:35:15 +02:00
TriBlade9 9a685a4f2e Add firelike drawtype 2014-09-21 15:50:27 -04:00
RealBadAngel e66bb9b864 Allow use all 6 faces for special tiles.
Protocol version bump.
2014-08-25 12:47:06 +02:00
RealBadAngel 6c98fd6658 Unite nodes shaders.
Pass drawtype and material type to shaders.
Move shaders generation to startup only.
Allow assign shaders per tile.
Initial code to support water surface shader.
2014-06-15 05:40:33 +02:00
RealBadAngel 2330267d22 Shaders rework. 2013-12-03 18:55:25 +01:00
BlockMen 7b13d119ed Add support for different drowning damage and allow drowning in other nodetypes 2013-08-06 17:49:39 +02:00
proller 0e89bca173 Leveled nodebox backward compatibility 2013-08-02 00:50:58 +04:00
proller 3aedfac968 Weather support 2013-07-27 23:21:48 +04:00
PilzAdam 413f0d0353 Add liquid_range to nodedef 2013-07-20 20:41:17 +02:00
Kahrl 112dbba7c4 Change ContentFeatures array to a vector 2013-07-14 23:06:31 +02:00
proller 9733dd5b5e Leveled nodebox 2013-07-13 22:13:24 +04:00
Kahrl 8161ab573f Remove texture atlas / AtlasPointer, rename getTextureRaw to getTexture 2013-07-02 03:03:10 +02:00
PilzAdam 53066024f6 Add drowning 2013-06-19 15:47:00 +00:00
Perttu Ahola bc3072b35e Fix compatibility of RBA's NDT_GLASSLIKE_FRAMED 2013-04-25 11:51:28 +03:00
RealBadAngel 625a4c2e66 Add new drawtype GLASSLIKE_FRAMED 2013-04-24 21:45:18 -04:00
kwolekr 414f0275cf Optimize CNodeDefManager::getIds 2013-03-30 19:14:42 -04:00
Jürgen Doser dacc8cdb3a Include backface_culling flag in serialization format for TileDefs
This way flowing liquids actually show the backface when specified to
do so. Without this, TileDefs where by default initialized with
backface_culling = true and never set otherwise.

For backwards compatibility, an old client connected to a new server,
or a new client connected to an old server will behave like before
i.e., backface_culling is always true.
2013-03-23 23:10:47 +01: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
Jeija 365c169b43 Disable placement prediction for nodes that use on_rightclick 2013-02-19 20:02:40 +01:00
Perttu Ahola 23913f26cd Support serialization of protocol 13 ContentFeatures 2012-11-29 22:08:25 +02:00
Ilya Zhuravlev 926830e0df Add liquid_renewable property. 2012-09-07 20:48:12 +04:00
Kahrl 1575448b1a Custom boxy nodes (stairs, slabs) and collision changes 2012-06-17 16:34:39 +03:00
Perttu Ahola 9f031a6759 Optimize headers 2012-06-17 04:03:39 +03:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola fd1135c7af Node texture animation 2012-06-16 16:47:28 +03:00
Perttu Ahola 3a0562bebc Add after_destruct and cache the existence of on_construct, on_destruct and after_destruct for quick skipping when a node does not have them 2012-06-05 23:51:37 +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
Kahrl 704782c95b WIP node metadata, node timers 2012-06-03 22:31:00 +03:00
Perttu Ahola 280e1a2512 Allow group:groupname in ABM definition and implement minetest.hash_node_position() 2012-03-31 12:30:11 +03:00
Perttu Ahola 06e93f8d95 Add sound.dig 2012-03-24 11:10:28 +02:00
Perttu Ahola 93219e3b9d Add sounds, tune things 2012-03-24 04:24:26 +02:00
Perttu Ahola 6c14025b2d Add event manager and use it to trigger sounds 2012-03-24 04:24:26 +02:00
Kahrl 807a0d313b MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints 2012-03-15 21:45:44 +02:00
Perttu Ahola 07ed57476f itemgroup.h and ItemGroupList typedef 2012-03-10 11:28:13 +02:00
Perttu Ahola 562ac3bce9 Digging time groups WIP 2012-03-10 11:28:12 +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 6145a135bd Make ToolItem and MaterialItem to convert names by aliases at creation time too (necessary for eg. crafting) 2011-12-04 02:12:45 +02:00
Perttu Ahola 4b00d4d9d2 Node definition aliases 2011-12-03 23:50:31 +02:00
Kahrl c1479a2732 Add node definitions in Lua and do not use content_mapnode_init anymore (except in test.cpp) 2011-11-29 19:13:52 +02:00
Perttu Ahola e5650bb549 Make liquid_alternative_* to be strings 2011-11-29 19:13:51 +02:00
Perttu Ahola 6a8f9135de Store metadata as metadata name in node definition 2011-11-29 19:13:51 +02:00
Perttu Ahola 901d98b687 Optimize map generator for the dynamic content ids a bit 2011-11-29 19:13:49 +02:00
Perttu Ahola 7a29b14a20 Improved MaterialItem (stores nodename) 2011-11-29 19:13:47 +02:00
Perttu Ahola c0f6395cf0 Node definition names 2011-11-29 19:13:46 +02:00
Perttu Ahola 50d63e4b0a Add name field to ContentFeatures 2011-11-29 19:13:46 +02:00
Perttu Ahola 6a417c538f Remove burn time definitions from FurnaceNodeMetadata 2011-11-29 19:13:46 +02:00
Perttu Ahola 7fae32095a Remove old comments 2011-11-29 19:13:46 +02:00
Perttu Ahola 37a5f8a30b Move cook result properly to ContentFeatures 2011-11-29 19:13:46 +02:00
Perttu Ahola cde35d1606 Clean nodefeat and content_mapnode a bit 2011-11-29 19:13:45 +02:00
Perttu Ahola 9fc78cbece Fix flowing water being always opaque 2011-11-29 19:13:45 +02:00
Perttu Ahola 6da8cb00e2 Node definitions transfer 2011-11-29 19:13:44 +02:00
Perttu Ahola eed727c61b Completely generalized mesh generation; ContentFeatures serialization 2011-11-29 19:13:44 +02:00
Perttu Ahola 89e7bacd99 Clean more 2011-11-29 19:13:44 +02:00
Perttu Ahola a48a0e77eb Prepare more for node definition serialization 2011-11-29 19:13:43 +02:00
Perttu Ahola cf6e22e9a6 Better node texture generation 2011-11-29 19:13:43 +02:00
Perttu Ahola c1202a2ecc Update inventory texture too 2011-11-29 19:13:43 +02:00
Perttu Ahola 01ae0daea5 Properly update textures in node definitions 2011-11-29 19:13:43 +02:00
Perttu Ahola 1afed48a2c Make possible and do update textures in node definitions after late texture atlas making 2011-11-29 19:13:42 +02:00
Perttu Ahola c6fd2986d4 GameDef compiles 2011-11-29 19:13:42 +02:00