Commit Graph

4095 Commits

Author SHA1 Message Date
paramat
569998011e Mgv7: Always carve river channels in mountain terrain
Previously, rivers were sometimes blocked by vertical walls
of mountain terrain due to river carving being disabled
when base terrain height was below water_level - 16
Remove now unused base terrain heightmap created in
generateTerrain()
2016-06-02 07:31:01 +01:00
Ekdohibs
14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
TriBlade9
1d40385d4a Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ 2016-05-31 17:34:29 +02:00
est31
27db929252 Add minetest.check_password_entry callback
Gives a convenient way to check a player's password.

This entirely bypasses the SRP protocol, so should be used
with great care.

This function is not intended to be used
in-game, but solely by external protocols, where no
authentication of the minetest engine is provided, and
also only for protocols, in which the user already gives the
server the plaintext password.

Examples for good use are the classical http form, or irc,
an example for a bad use is a password change dialog inside
formspec.

Users should be aware that they lose the advantages of the SRP
protocol if they enter their passwords for servers outside the
normal entry box, like in in-game formspec menus,
or through irc /msg s,

This patch also fixes an auth.h mistake which has mixed up the
order of params inside the decode_srp_verifier_and_salt function.

Zeno-: Added errorstream message for invalid format when I committed
2016-05-30 23:28:08 +10:00
Zeno-
a9bc7dc405 Remove unused code in s_security.cpp (#4172)
Note that the macro CHECK_FILE_ERR implements the code removed
2016-05-30 22:37:40 +10:00
Auke Kok
d499ec4838 Particles: Add option to remove particles on collision
Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.
2016-05-28 00:08:23 -04:00
red-001
62d15ac7c1 Add base64 encoding and decoding to the lua api. (#3919) 2016-05-27 23:37:28 -04:00
kwolekr
c4e083f7e1 Disallow external linkage for default Cavegen NoiseParams 2016-05-27 23:23:58 -04:00
kwolekr
c8fd232678 Dungeongen: Remove dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
fd0efb21c3 Mapgen: Combine dungeon generation code 2016-05-27 23:23:58 -04:00
kwolekr
0810901766 Mapgen: Deduplicate common constructor code 2016-05-27 23:23:58 -04:00
kwolekr
0df5c01a8c Mapgen: Remove calculateNoise from most mapgens
This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.
2016-05-27 23:23:58 -04:00
kwolekr
c5968049bb Mapgen V7: Remove now-unused ridge heightmap 2016-05-27 23:23:58 -04:00
kwolekr
548d99bb45 Cavegen: Move V5-style caves to CavesNoiseIntersection 2016-05-27 23:23:58 -04:00
kwolekr
6151f7bc4b Cavegen: Minor misc. fixes
- Convert instances of numeric literal doubles to floats
- Move dswitchint to a local variable now that being a member is unnecessary
- Improve const correctness
- Indentation fixes
2016-05-27 23:23:58 -04:00
kwolekr
b1eb757e60 Fix undefined evaluation order when constructing random vectors
MSVC and GCC evaluate parameters in right-to-left order, whereas Clang
evaluates in left-to-right order, and of course, an optimization could
leave the order of evaluation completely indeterminate.

This commit fixes all instances of the error by explicitly assigning the
results of expressions that use PseudoRandom::next() or range() to their
respective vector components.

The right-to-left evaluation behavior is preserved since Clang is much less
commonly used to compile Minetest than GCC and MSVC combined, and would
therefore cause the least harm.
2016-05-27 23:23:58 -04:00
kwolekr
5b05f75a27 Cavegen: Re-add small caves to CavesRandomWalk 2016-05-27 23:23:58 -04:00
kwolekr
db1b4dc890 Cavegen: Remove CavesRandomWalk dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
68b1cd8d1b Cavegen: Merge instances of repetitive surface level-finding code 2016-05-27 23:23:58 -04:00
kwolekr
a605d69092 Cavegen: Remove CavesV6 dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
bf25837617 Cavegen: Rename CaveV6 to CavesV6
- Add comment explaining why it exists
- Remove unused 'flooded' variable
- Rename shadowed variable
- Fix some code style
2016-05-27 23:23:58 -04:00
kwolekr
1bb5eb1da2 Cavegen: Merge CaveV5 and CaveV7 into CavesRandomWalk 2016-05-27 23:23:58 -04:00
kwolekr
9b5c492be5 Fix MgStoneType and BiomeType enum names 2016-05-27 23:23:58 -04:00
kwolekr
87bc39dca7 Mapgen: Combine generateBiomes, dustTopNodes, and generateCaves
This commit condenses the above methods into a single implementation used by
V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
2016-05-27 23:23:58 -04:00
kwolekr
76f4856479 Move biome calculation to BiomeGen
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
for a given area using the algorithm implemented by that specific BiomeGen.
This abstracts away the old system where each mapgen supplied the noises
required for biome generation.
2016-05-27 23:23:58 -04:00
est31
fa6b21a15b Tell irrlicht if we handle a key or not.
We can remove the function in MtNativeActivity now
as it serves precisely that purpose: to tell irrlicht
that we handled the esc key.

TODO for later:
 * Perhaps try to find a more performant container than KeyList
2016-05-26 20:33:33 +02:00
ShadowNinja
ef100f12a1 Fix rollback.txt migration
Broken by b1965ac209.
This also prepares the begin and commit statements only once.
2016-05-23 11:48:30 -04:00
Craig Robbins
22f78ea38e Fix irrlicht version checking macro for tooltip_height calculation 2016-05-24 00:27:11 +10:00
Ekdohibs
725edc78b2 Move updateTextures and fillTileAttribs to ContentFeatures 2016-05-23 12:46:45 +02:00
est31
423d8c1b0d Tolerate packet reordering in the early init process
Fixes a bug where packet reordering made the server give the
client two peer ids instead of one. This in turn confused
reliable packet sending and made connecting to the server fail.

The client usually sends three packets at init: one "dummy"
packet consisting of two 0 bytes, and the init packet as well as
its legacy counterpart. The last one can be turned off since commit
af30183124, but this is of lower
relevance for the bug. The relevant part here is that network
packet reorder (which is a normal occurence) can make the packets
reach the server in different order.

If reorder puts the dummy packet further behind, the following
would happen before the patch:

1. The server will get one of the init packets on channel 1 and
   assign the client a peer id, as the packet will have zero as
   peer id.

2. The server sends a CONTROLTYPE_SET_PEER_ID packet to inform
   the client of the peer id.

3. The next packet from the client will contain the peer id set by
   the server.

4. The server sets the m_has_sent_with_id member for the client's
   peer structure to true.

5. Now the dummy packet arrives. It has a peer id of zero, therefore
   the server searches whether it already has a peer id for the
   address the packet was sent from. The search fails because
   m_has_sent_with_id was set to true and the server only searched
   for peers with m_has_sent_with_id set to false.

6. In a working setup, the server would assign the dummy packet to
   the correct peer id. However the server instead now assigns a
   second peer id and peer structure to the peer, and assign the
   packet to that new peer.

7. In order to inform the peer of its peer id, the server sends a
   CONTROLTYPE_SET_PEER_ID command packet, reliably, to the peer.
   This packet uses the new peer id.

8. The client sends an ack to that packet, not with the new peer id
   but with the peer id sent in 2.

9. This packet reaches the server, but it drops the ACK as the peer
   id does not map to any un-ACK-ed packets with that seqnum. The
   same time, the server still waits for an ACK with the new peer
   id, which of course won't come. This causes the server to
   periodically re-try sending that packet, and the client ACKing it
   each time.

Steps 7-9 cause annoyances and erroneous output, but don't cause
the connection failure itself.
The actual mistake that causes the connection failure happens in 6:
The server does not assign the dummy packet to the correct peer, but
to a newly created one.
Therefore, all further packets sent by the client on channel 0 are
now buffered by the server as it waits for the dummy packet to reach
the peer, which of course doesn't happen as the server assigned
that packet to the second peer it created for the client.
This makes the connection code indefinitely buffer the
TOSERVER_CLIENT_READY packet, not passing it to higher level code,
which stalls the continuation of the further init process
indefinitely and causes the actual bug.

Maybe this can be caused by reordered init packets as well, the only
studied case was where network has reliably reordered the dummy
packet to get sent after the init packets.

The patch fixes the bug by not ignoring peers where
m_has_sent_with_id has been set anymore. The other changes of the
patch are just cleanups of unused methods and fields and additional
explanatory comments.

One could think of alternate ways to fix the bug:

* The client could simply take the new peer id and continue
  communicating with that. This is however worse than the fix as
  it requires the peer id set command to be sent reliably (which
  currently happens, but it cant be changed anymore). Also, such a
  change would require both server and client to be patched in order
  for the bug to be fixed, as right now the client ignores peer id
  set commands after the peer id is different from
  PEER_ID_INEXISTENT and the server requires modification too to
  change the peer id internally.
  And, most importantly, right now we guarantee higher level server
  code that the peer id for a certain peer does not change. This
  guarantee would have to be broken, and it would require much
  larger changes to the server than this patch means.

* One could stop sending the dummy packet. One may be unsure whether
  this is a good idea, as the meaning of the dummy packet is not
  known (it might be there for something important), and as it is
  possible that the init packets may cause this problem as well
  (although it may be possible too that they can't cause this).

Thanks to @auouymous who had originally reported this bug and who
has helped patiently in finding its cause.
2016-05-22 15:56:54 +02:00
Loic Blot
f64a6259b2 Fix a m_camera not used warning fix pointed by clang 2016-05-22 13:31:41 +02:00
Loic Blot
ce42ff9cf7 Implement a PostgreSQL backend 2016-05-22 11:34:47 +02:00
Craig Robbins
88acda0256 Fix tooltip height for versions of irrlicht < 1.8.2
Version 1.8.2 of irrlicht changed the way that IGUIStaticText::getTextHeight() works and since that release properly deals with newlines.

From irrlicht changes.txt for 1.8.2, "IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set."
2016-05-21 00:26:04 +10:00
nerzhul
8ba6d9f227 Implement DatabaseException for databases 2016-05-17 14:36:51 +02:00
Loic Blot
143401451c DB::loadBlock copy removal & DB backend cleanup
* Remove the copy from db::loadBlock by using a pointer to the destination
* cleanup db backend, the child backend doesn't have to set their functions as virtual
2016-05-17 06:52:16 +02:00
Craig Robbins
8bb9e467d6 Fix typo in the info printed by --version 2016-05-11 23:20:20 +10:00
Craig Robbins
58b54cf9a9 Add platform name to --version information 2016-05-11 17:15:41 +10:00
kwolekr
ebe638c32d Mapgen V6: Synchronize spflags with defaultsettings
This fixes an issue where trees are omitted from Mapgen V6 maps on
configurations that explicitly defined the mgv6_spflags setting.
2016-05-10 22:44:18 -04:00
SmallJoker
53e9587861 Add [resize texture modifier Resizes the texture to the given dimensions. 2016-05-09 20:48:42 +02:00
paramat
1db499dc6d Defaultsettings/Android: Increase 'max block generate distance' to 3 2016-05-08 22:08:29 +01:00
gregorycu
b8aed9dfc2 Fixes #4098 ce8a9ed didn't quite go far enough, and left this bug in 2016-05-08 19:03:09 +10:00
Kahrl
2cdd9b4ab6 Chat: Keep scroll position constant in ChatBuffer::deleteOldest() 2016-05-08 02:51:23 +01:00
Maksim Gamarnik
0f6e4a0913 Optimize default settings for Android build 2016-05-07 21:09:07 +10:00
Ekdohibs
4d9dbceb39 Run unescape_enriched *after* unescape_string.
Doing it the other way round was a mistake, since it breaks
minetest.formspec_escape with escape sequences that contain
special characters.
2016-05-07 08:33:21 +02:00
Ekdohibs
d5c3db9c41 Make dropdowns show the string that was their argument.
This makes it work even if it contains escape sequences,
which didn't work before.
2016-05-07 08:33:21 +02:00
Maksim Gamarnik
bb925479a5 Android: Increase player_stepheight for thicker snow nodebox 2016-05-06 00:32:35 +01:00
est31
063be8a126 Update settings translation file and minetest.conf.example 2016-05-05 16:12:58 +02:00
Craig Robbins
d864c13333 Fix holding down F10 (open console) causing GUI to freeze 2016-05-04 21:31:23 +10:00
paramat
b22de6470b Settings_translation_file: Update mapgen with cave width parameter 2016-05-03 00:44:34 +01:00
Craig Robbins
c92cff5d52 Fix Windows build
Fixes the issue introduced by c1a0ebb (Fix use of uninitialised variable
in class Event) causing Windows builds to fail
2016-05-02 15:01:17 +10:00
Kahrl
8fe753c3d9 FileSelectMenu: Fix formspec parsing broken by Irrlicht file-chooser 2016-05-01 16:32:12 +02:00
Auke Kok
aa8c88cf4a find_path: consider walkable instead of CONTENT_AIR
The path finding code works fairly well except that it considers
anythin not CONTENT_AIR to be "above the surface". This results in
paths that are unwalkable for entities since e.g. plants are not
walkable. The path would force them to jump on top of grass plants,
etc..

The obvious solution is not to use CONTENT_AIR as a criteria, but
instead distinguish between walkable and non-walkable nodes. This
results in paths that properly walk through grass nodes.

This was extensively tested by a flock of electric sheep.

Note that for underwater purposes this changes the behaviour from
"the surface is walkable" to "ignore water entirely" making the
path go across the water bottom, and pathing fail likely from the
water surface. This is intentional.
2016-05-01 15:32:03 +02:00
est31
9aec701a4c Pathfinder: improve GridNode storage
Before, the GridNodes were stored in vector<vector<vector<T>>>,
and initialized in advance. Putting three vectors inside each other
puts lots of unneccessary stress onto the allocator, costs more memory,
and has worse cache locality than a flat vector<T>.

For larger search distances, an the array getting initialized means
essentially O(distance^3) complexity in both time and memory,
which makes the current path search a joke. In order to really
profit from the dijkstra/A* algorithms, other data structures
need to be used for larger distances.

For shorter distances, a map based GridNode storage may be slow as
it requires lots of levels of indirection, which is bad for things like
cache locality, and an array based storage may be faster.

This commit does:

1. remove the vector<vector<vector<T>>> based GridNodes storage that
	is allocated and initialized in advance and for the whole
	possible area.

2. Add a vector<T> based GridNodes storage that is allocated and
	initialized in advance for the whole possible area.

3. Add a map<P,T> based GridNodes storage whose elements are
	allocated and initialized, when the path search code
	demands it.

4. Add code to decide between approach 2 and 3,
	based on the length of the path.

5. Remove the unused "surfaces" member of the PathGridnode class.
	Setting this isn't as easy anymore for the
	map based GridNodes storage.
2016-05-01 15:32:03 +02:00
est31
f0de237de7 Pathfinder: use core::aabbox3d instead of own type
There is no need to reinvent the wheel here, we have
great classes from irrlicht.
2016-05-01 15:32:03 +02:00
est31
ac8bb457aa Pathfinder: Fix style
* Fix naming style for methods and classes:
	Use camelCase for methods and PascalCase for classes as
	code style demands it. And use sneak_case for methods that
	are not member of a class.
* Replace "* " with " *" for Pointers
* Same for references
* Put function body opening braces on new line
* Other misc minor non functional style improvements
2016-05-01 15:32:02 +02:00
est31
46e5ef4e9a Move pathfinder classes to cpp file
There is no need to put them into the header, they are solely used
inside the pathfinder.

Another advantage of this change is that only the pathfinder.cpp has
to be compiled if PATHFINDER_DEBUG gets defined or undefined, not
all files including the .h.

This commit moves the pathfinder classes to the cpp file without
modifications.
Also, the PATHFINDER_DEBUG macro gets moved to the cpp file and
the PATHFINDER_CALC_TIME macro gets moved to a plce where it
actually does work.
2016-05-01 15:32:02 +02:00
Craig Robbins
c1a0ebb725 Fix use of uninitialised variable in class Event 2016-05-01 17:32:00 +10:00
gregorycu
c95734654c Use MoveFileEx to rename files on Windows (not rename) 2016-05-01 17:28:16 +10:00
ShadowNinja
a53357d291 Fix POSIX C++11 build
I broke this in 46fd114e9a.
2016-04-30 13:41:04 -04:00
Craig Robbins
ae75073944 Fix prepreprocessor error in thread.h (related to C++11 threads) 2016-04-30 12:29:52 +10:00
paramat
8b1f8e99cf Mapgen: Make 3D noise tunnels' width settable
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
2016-04-28 23:36:19 -04:00
ShadowNinja
46fd114e9a Fix race on thread creation
This often broke the threading tests on OSX.
2016-04-28 13:21:46 -04:00
SmallJoker
30083d1e00 Mainmenu: Standardize the menu button order and sizes 2016-04-28 07:16:58 +01:00
obneq
6278da296b Handle particle spawners in env and delete expired ids
Rebased by Zeno (2016-04-2016)
2016-04-28 02:09:36 +10:00
Xunto
ae7fb9b5be Inventory: Make ItemStack with different metadata not stackable 2016-04-26 10:16:20 +01:00
SmallJoker
31c1fca6fd tile.cpp: Automatically upscale lower resolution texture 2016-04-25 06:39:32 +01:00
gregorycu
46da0e8b3b Make GUIEngine use pause_fps_max not fps_max 2016-04-24 17:40:16 +10:00
Ekdohibs
48939df9a5 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
Xunto
21079cc8eb Fix bug that was leading to oversized tooltips containing multiline text when it have multiple lines 2016-04-23 21:12:53 +10:00
Ekdohibs
c350cfb50b Make logging use a fixed-length buffer to avoid race conditions.
Previously, race conditions occurred inside logging, that caused
segfaults because a thread was trying to use an old pointer that
was freed when the string was reallocated. Using a fixed-length buffer
avoids this, at the cost of cutting too long messages over seveal lines.
2016-04-21 10:15:17 +01:00
paramat
5c32c5e945 Biomes: Make dust fallback 'ignore' to fix y = 63 lighting
The shadow bug at y = 63 was caused by dark air being placed as dust,
when the biome dust was unspecified it was falling back to 'air'
In dustTopNodes only dust == 'ignore' will disable dust placement
2016-04-21 10:15:12 +01:00
paramat
fed5dd3b5d Mgv7: Combine mountain terrain generation with base terrain generation
Previous mountain terrain generation was by necessity placing
stone in air, this was removing air from any overgenerated
structures such as tunnels, dungeons and large caves
Moving it into the base terrain generation loop ensures that
only 'ignore' is replaced

generateRidgeTerrain: only return if node_max.Y < water_level - 16
Previously, if water level was set a few nodes above a mapchunk
border the river channel was only partially excavated
2016-04-20 06:51:20 +01:00
TriBlade9
6530ed4dd8 Add option to disable entity selectionboxes. (#3992)
Setting only loaded once, default value is to enable them.
2016-04-14 11:20:11 +02:00
rubenwardy
b5f6d41eed Fix inventory hud scaling 2016-04-12 23:10:28 +10:00
paramat
4fdf66bbf4 Mgv7, mgflat, mgfractal: Tunnel generation code optimisation 2016-04-12 06:58:04 +01:00
paramat
e661d8b32c Mgv5: Optimise tunnels, add biome material in entrances
Place biome top node on tunnel entrance floor
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
2016-04-12 04:16:15 +01:00
paramat
fe349d401d Mgvalleys: Don't let cavegen place biome nodes everywhere
Fix use of 'air_above' bool so that biome
nodes are only placed in tunnel floors
Minor code improvements
'Continue' when massive cave air is placed
2016-04-12 04:16:08 +01:00
PilzAdam
73d4538d94 Fix hotbar placement on displays with low screen density 2016-04-11 23:04:42 +02:00
kwolekr
2eeb62057a Hud: Cache hud_scaling, fix minor style issues 2016-04-10 23:54:34 -04:00
rubenwardy
eae33951ad Hud: Fix offset being ignored by inventory bar 2016-04-10 23:54:23 -04:00
est31
9a04dfd0f5 Update CSRP-GMP to commit deaa11a7c29a73008
Backports 10 commits, with 8 commits
actually affecting source code:

695822e45d...deaa11a7c2
2016-04-10 14:56:54 +02:00
paramat
465bb6f5d1 Mapgen: Optimise cave noises and tunnel excavation
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
Move some old unused code in mgv7 to end of file
2016-04-08 03:14:36 +01:00
kwolekr
c3993f6604 Re-add and disable blit_with_interpolate_overlay 2016-04-07 04:01:43 -04:00
Nathanaël Courant
15e1dcc020 Fix #3955 (player dying on login).
It was caused by player not moving because fall was prevented, but their
velocity still increasing, causing fatal fall damage when world was
finally loaded. This commit fixes it by setting player velocity to zero
when the world around them is not loaded.
2016-04-06 01:11:36 +02:00
Samuel Sieb
24b32ab09d Fix compiler warnings from "Add an option to colorize to respect the destination alpha"
Fix warnings added by commit 01ae43c480

Fixes #3952
2016-04-06 00:36:24 +02:00
Samuel Sieb
01ae43c480 Add an option to colorize to respect the destination alpha
Also, rework the colorizing code to be more efficient.
2016-04-03 04:24:28 -04:00
kinokoio
66af984e0e Dungeongen: Update disabled torch placement code 2016-04-03 04:12:07 -04:00
est31
b8ac7b80e6 Fix nametag hiding
Commit

c3b279750e "Move object nametags to camera"

has added a regression to still display
a shadow if their alpha got set to 0.
2016-04-02 02:02:19 +02:00
gregorycu
f9a90383e1 Remove expensive copy of ContentFeatures 2016-03-30 11:38:42 -04:00
Loic Blot
e082c7766a ParticleManager::handleParticleEvent: use switch
Use a proper switch with breaks.
2016-03-30 17:20:24 +02:00
est31
0aac1b7403 mg_schematic: fix leak in lua API, and small cleanup
* Fix leak like behaviour if you load multiple schematics in a loop.

* Cleanup check in for, fixing theoretical out of bounds read if
	Schematic::deserializeFromMts reduced the number of elements
	in m_nodenames. A != check may need an overflow of the counter
	before it hits, if origsize is larger than m_nodenames.size().

* Fix function name passed to errorstream: it was wrong. Also use
	__FUNCTION__ instead of manually using the method name at other
	places in the function.

* Don't shadow the name member in the loop.
2016-03-30 16:26:05 +02:00
kwolekr
0115da1d63 Mapgen: Don't spread light of nodes outside the desired area
This fixes #3935, a regression from 0338c2e.
An 'optimization' was performed where an index for the VoxelManip being
operated on was mistakenly used for bounds checking within the incorrect
VoxelArea, namely, the area wherein light should be spread.
2016-03-30 00:19:03 -04:00
paramat
630f453da4 Mgv7: Decrease cliff steepness 2016-03-30 01:53:14 +01:00
kwolekr
0338c2eb91 Mapgen: Spread both night and day light banks in spreadLight 2016-03-29 16:32:30 -04:00
sfan5
8f43aaf6ae Fix small formatting issue in SRP debug output
Writing an u8 to verbosestream writes a char, not it's numeric value.
2016-03-29 19:59:14 +02:00
Auke Kok
80cec4702d Fix connected nodes' selection boxes.
This allows the player to more easily target and punch connected
nodeboxes, especially if they have a fixed nodebox that is very
small, like technic cabling, or xpanes. Tried it on fences and
my xpane conversion, and happy with the result.
2016-03-21 17:42:20 +00:00
paramat
493a298c0c Mgv7/flat/fractal: Stop tunnel-floor biome nodes being placed everywhere
A bool for 'in or under tunnel' was missing
1-node-deep stone ledges were being
replaced with biome surface material
2016-03-21 17:42:13 +00:00
ShadowNinja
93887043d9 Clean up Strfnd
Changes:
  * Fix indentation.
  * Pass strings by const reference.
  * Merge Strfnd and WStrfnd into one class instead of copying them.
  * Remove trailing spaces.
  * Fix variable names.
  * Move to util.
  * Other miscellaneous style fixes.
2016-03-19 21:27:57 -04:00
paramat
f1aea6b4ff Mgv7: Limit pseudorandom caves to surface mapchunk or below
To avoid bright caves at mapchunk borders when generating mapchunks upwards
2016-03-19 17:56:35 +00:00
Auke Kok
c5c727d627 Allow NodeTimer, ABM and block mgmt interval changes.
ABM's are hardcoded to run every 1.0s, NodeTimers are hard coded to
run at every 1.0s. Block mgmt is running every 2.0sec.

However, these timers can be better tuned for both higher and lower
values by server owners. Some server owners want to, and have the
resources to send more packets per second to clients, and so they
may wish to send smaller updates sooner. Right now all ABM's are
coalesced into 1.0 second intervals, resulting in large send queues
to all clients. By reducing the amount of possible timers, one can
get a far better response rate and lower the perception of lag.

On the other side of the camp, some servers may want to increase
these values, which again isn't easily doable.

The global settings abm_interval and nodetimer_interval are set to
current values by default. I've tested with 0.2/0.5 type values
and noticed a greatly improved response and better scattering of
nodetimers, as well as enjoying not faceplanting into doors with
pressure plates anymore.
2016-03-19 17:56:26 +00:00