Commit Graph

144 Commits

Author SHA1 Message Date
Auke Kok
882a89d65a Allow per-tiles culling.
Backface culling is enabled by default for all tiles, as this
is how the lua parser initializes each tiledef. We revert to
always using the value from the tiledef since it is always
read and serialized.

Mods that wish to enable culling for e.g. mesh nodes, now can
specify the following to enable backface culling:

    tiles = {{ name = "tex.png", backface_culling = true }},

Note the double '{' and use of 'name' key here! In the same
fashion, backface_culling can be disabled for any node now.

I've tested this against the new door models and this properly
allows me to disable culling per node. I've also tested this
against my crops mod which uses mesh nodes where culling needs
to be disabled, and tested also with plantlike drawtype nodes
where we want this to continue to be disabled.

No default setting has changed. The defaults are just migrated
from nodedef.cpp to c_content.cpp.
2016-01-20 00:36:48 +00: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
ShadowNinja
96cc5b34fe Use warningstream for log messages with WARNING
Remove DTIME macro and its uses, too
2015-10-14 01:36:48 -04:00
David Jones
34b7a147dc Change i++ to ++i 2015-08-25 18:33:52 -04:00
RealBadAngel
8b8d17b22b Remove use of engine sent texture tiling flags - theyre no longer needed 2015-08-20 02:41:40 +02:00
RealBadAngel
3295f3c401 Fix tiling issues for PLANTLIKE and FIRELIKE with FSAA 2015-08-05 22:52:32 +02:00
RealBadAngel
60350699c7 Add wielded (and CAOs) shader 2015-07-21 23:56:41 +02:00
RealBadAngel
655fc6010f Fix relief mapping issues 2015-07-16 15:36:48 +02:00
RealBadAngel
39439cbd3d Add new leaves style - simple (glasslike drawtype) 2015-07-08 11:20:07 +02:00
RealBadAngel
b160f8dfe7 Minimap update 2015-06-28 12:17:36 +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
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
b45df9d6a7 Tests: Add NodeResolver unittests
Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
2015-05-05 12:00:36 -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
Craig Robbins
9527984dbc Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
Aaron Suen
db32e6c5aa Move texture_min_size even further down the pipe. Now, textures are JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements. 2015-03-31 16:56:33 +10: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
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
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
091594e26e NodeDef: Clear NodeResolver related entries too in clear() 2015-01-04 22:39:57 -05: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
c6df2bc42c Add support back for resolving group names in NodeResolver 2014-12-29 23:15:53 -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
unknown
1e8e700ee6 Change TileSpec::frames to be std::vector not std::map
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-21 02:41:17 +10:00
Anton
10e0cf8b2c Use std::string::empty() instead of size() where applicable 2014-12-12 15:16:24 -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
RealBadAngel
a648120d54 Recalculate normals for mesh #0. Fix for issue #1902. 2014-12-05 01:05:18 +01:00
Craig Robbins
d406ac994b Optimise functions from CNodeDefManager and VoxelManipulator
CNodeDefManager::get()
VoxelManipulator::addArea()
2014-11-21 14:56:45 +10:00
ShadowNinja
da0f1e5497 Fix wallmounted mesh rotations 2014-11-19 16:17:54 -05:00
RealBadAngel
dd4c21c180 Add option to enable mesh caching, add wallmounted for meshes. 2014-10-29 08:37:33 +01: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
d221917170 Recalculate normals for cached meshes.
Check if mesh is here before adding to meshcollector.

Fix deleting the meshes.
2014-10-21 18:43:29 +02:00
Kahrl
9029a34cc6 Fix some indentation in nodedef.cpp 2014-10-20 16:11:38 +02:00
Kahrl
ae375cc322 Fix memory leak caused by mesh nodes (and nodeboxes) 2014-10-20 16:11:00 +02: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
kwolekr
173beeee65 Fix special tile backspace culling 2014-10-03 11:20:29 -04:00
RealBadAngel
0920f55eb4 Fix broken plantlike drawtype. 2014-10-03 15:33:32 +02:00
kwolekr
37d3c3d328 Fix misc. style issues 2014-10-03 03:49:06 -04:00
kwolekr
01ce57ade5 Clean up nodedef.cpp 2014-10-03 03:21:08 -04: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