Skip to content
Branch: master
Commits on Mar 5, 2019
  1. Add referer to remote media requests. (#8135)

    sofar authored and nerzhul committed Mar 5, 2019
    This sends the following header to a remote media server:
        Referer: minetest://<server_name>:port
    This was verified with CTF and the Minetest Public Remove Media
    server. If the servername was a plain IPv6 address it will
    contain `:` characters and will be encapsulated in `[]` to
    be a valid URI.
  2. getS16NoEx() returns true unless syntactical error in conf. (#8304)

    sofar authored and nerzhul committed Mar 5, 2019
    The getS16NoEx() handler will return true unless there is a
    `[num_emerge_threads]` line in the `minetest.conf` at which
    point the excption handler part is reached. Due to the fact that
    `defaultsettings.cpp` has a default value set for this setting,
    that never will happen.
    Because of this, the code will never check the number of threads on
    the system, and keep `nthreads = 0`. If that happens, the value is
    changed to `1` and only 1 emerge thread will be used.
    The default should be set to `1` instead, due to the potential unsafe
    consequences for the standard sqlite map files, but that should be a
    separate commit that also adds documentation for that setting. This
    commit focuses on removing this `hiding` bug instead.
Commits on Jan 3, 2019
  1. Remove remote media compatibility mode. (#8044)

    sofar authored and nerzhul committed Jan 3, 2019
    The fallback code shouldn't be needed and is a remnant of the GET
    method that old media servers use. Clients using it are likely
    to just waste bandwidth and having to download the media again
    through the normal transfer from server method. The most reliable
    method is to get all missing textures therefore from the server
    directly and not spam the remote media server with 404s.
Commits on Dec 26, 2017
  1. Wireshark plugin: Complete all commands. (#6841)

    sofar authored and nerzhul committed Dec 26, 2017
    This still leaves plenty of data undecoded, but just having the packet
    types all covered 100% for 0.4.16 will make looking at traces a lot
    simpler than seeing half the packets show up as unknown.
Commits on Nov 14, 2017
  1. Sounds: Add falling node sounds

    sofar authored and paramat committed Nov 9, 2017
    Falling nodes should make a sound. This can only be done here,
    so for simplicity we just call the sound_play() here with the node
    place sound. We ignore any gain value in the sound spec since a
    falling node should be loud, so the 1.0 default gain makes sense
Commits on Oct 20, 2017
  1. Correct `prot_vers` in lua_api.txt.

    sofar committed Oct 20, 2017
    We should avoid providing incorrect struct members in documentation
    since people will be coding based on them.
Commits on Sep 11, 2017
  1. Implement client node dig prediction

    sofar authored and sfan5 committed Sep 11, 2017
    Dig prediction allows clients to remove dug nodes without
    waiting for server acknowledgement.
    This patch allows mods to override dig prediction,
    it can either be turned off or a different "prediction node"
    can be selected.
Commits on May 9, 2017
  1. Move Pilzadam to previous developers. (#5735)

    sofar authored and nerzhul committed May 9, 2017
Commits on Apr 29, 2017
  1. Reorder TileLayer. (#5638)

    sofar authored and nerzhul committed Apr 29, 2017
    Despite the split of TileSpec into TileDef and TileLayer, the
    TileLayer struct is still 66 bytes large, and doesn't fit in
    a single cacheline.
    I'm moving the color member to cacheline 2, in the hope that it
    is less used and the compiler loads all the hot members in a single
    cacheline instead. Only color sits now in cacheline 2, all the
    other members are in cacheline 1.
    Note: is_color is probably rarely set, most nodes will likely
    not use hardware coloring, but this may change in the future.
    Ideally, this class is shrunk to 64 bytes.
Commits on Apr 28, 2017
  1. Allow mesh and nodeboxes to wave like plants or leaves. (#3497)

    sofar authored and SmallJoker committed Apr 28, 2017
    We introduce a new value for "waving" - 2:
    0 - waving disabled
    1 - wave like a plant
    2 - wave like a leave
    Plantlike nodes will only allow waving = 1, but for leaves we will
    permit both 1 and 2 since current minetest_game sets it to 1 for
    all leaves. This makes it somewhat backwards compatible.
    For mesh and nodebox, values 1 and 2 are both valid, and the node
    can wave in both fashions as desired.
    I've tested this with the crops:corn plants, which are mesh nodes,
    and the results are really good. The code change is trivial as
    well, so I've opted to document the waving parameter in lua_api.txt
    because it was missing from there.
    Nodeboxes likely will not wave properly unless waving = 2. However
    it's possible that waving=1 may be desired by some mod developers
    for geometries I have not tried, so the code will not prohibit
    either value for mesh and nodebox drawtypes.
    Add lua_api.txt documentation for this feature and document both
    the existing functionality and the expansion to mesh and nodebox
Commits on Apr 22, 2017
  1. Add on_flood() callback.

    sofar authored and paramat committed Apr 20, 2017
    This callback is called if a liquid definitely floods a non-air
    node on the map. The callback arguments are (pos, oldnode, newnode)
    and can return a `bool` value indicating whether flooding the
    node should be cancelled (`return true` will prevent the node
    from flooding).
    Documentation is added, the callback function was tested with a
    modified minetest_game.
    Note that `return true` will likely cause the node's `on_flood()`
    callback to be called every second until the node gets removed,
    so care must be taken to prevent many callbacks from using this
    return value. The current default liquid update interval is 1.0
    seconds, which isn't unmanageable.
    The larger aim of this patch is to remove the lava cooling ABM,
    which is a significant cost to idle servers that have lava on their
    map. This callback will be much more efficient.
Commits on Apr 18, 2017
  1. Reorder TileSpec. (#5591)

    sofar authored and nerzhul committed Apr 18, 2017
    Put accessed members that are needed by updateFastFaceRow()
    all in the same cacheline.
  2. Don't make TAB exit game if bound to inventory.

    sofar committed Apr 15, 2017
    I play with the TAB key bound to the inventory. However, the
    code here assumes that TAB means "close formspec" in all contexts,
    including the main menu. This causes my game to exit when I attempt
    to TAB in between USERNAME and PASSWORD fields.
    We know when m_client != NULL that the game is a client game and
    not in the main menu, and then it's OK to use the INVENTORY bound
    key to exit the formspec, since it's not the main menu.
Commits on Apr 17, 2017
  1. Plug two minor Leaks (#5603)

    sofar authored and nerzhul committed Apr 17, 2017
    * Resource leak: CHECK_FILE_ERR returns, without freeing chunk_name.
    Found with static analysis.
    * Resource leak: leaks `page` on error path.
    Found with static analysis.
Commits on Apr 7, 2017
  1. Fix "error: ‘playerSAO’ was not declared"

    sofar committed Apr 7, 2017
    Cause: 351cc2e
    A rebase issue missed a rename from playerSAO to playersao.
Commits on Apr 2, 2017
  1. minetest.after(): simplify further, pause in singleplayer (#5500)

    sofar authored and nerzhul committed Apr 2, 2017
    Using the `dtime` value entirely, this will stop the clock
    if the game is paused in singleplayer. Since most of the
    clocks were fixed a long time ago, this should again be
    safe to use.
Commits on Mar 15, 2017
  1. Fix two nul deref if digging unknown nodes. (#5398)

    sofar authored and nerzhul committed Mar 15, 2017
    Introduced by d785456 (#5162)
Commits on Mar 12, 2017
  1. Do not increase breath if at full breath.

    sofar committed Mar 11, 2017
    Prevents the server from sending TOCLIENT_BREATH packets
    every 0.5seconds, if there is no reason to.
Commits on Mar 5, 2017
  1. Font: attempt fallback font, abort if no fonts found.

    sofar authored and paramat committed Feb 18, 2017
    If you happen to have a font_path setting that is incorrect,
    minetest will just attempt to start the gui without a valid
    font which leads to a segfault later on.
    We can attempt to load the fallback font path fairly easy,
    but if that fails we should give up with a proper error message
    and not a weird segfault later. This forces an abort() if
    the fallback fails as well, and prints a useful error
    message to the console.
Commits on Feb 17, 2017
  1. Revert part of eb49009 (#5230)

    sofar committed Feb 14, 2017
    This reverts the removal of Droid Sans as fallback font. The
    license for this font used to be GPL2. I've updated the font
    files to Liberation 2.00, which are SIL, and do not require
    us to ship source code.
    I've attempted to fix all the attribution and license strings,
    and used the strings as provided by redhat for attribution
    to make sure they're correct.
    Last, I've removed a bunch of executable bits on files that do
    not need them.
    Fixes #5231
Commits on Feb 14, 2017
  1. FreeType: address font license issues (#5230)

    sofar committed Feb 14, 2017
    It appears we were shipping font files without license text, and I
    had my doubts about the bitmap fonts being usable directly.
    This replaces existing TTF fonts with Apache-2.0 licensed fonts from
    chome core (Cousine, Arimo, Tinos). Include the full license file
    for all three fonts.
    The Lucida Sans font bitmap is removed entirely for non-freetype
    builds. There is therefore only mono fonts for non-freetype builds.
Commits on Feb 9, 2017
  1. Change default nodetimer_interval to 0.2s. (#5193)

    sofar authored and nerzhul committed Feb 9, 2017
    We want to reduce the chance that we get lots and lots of node
    timers all happening once a second, because we're better off doing
    small bits of work as they are available.
    Reducing this to 0.2 seconds will greatly reduce the total amount
    of nodetimers that elapse at the same instance, while not effecting
    total work load. This results in a far better chance of the server
    keeping up with work loads.
Commits on Feb 6, 2017
  1. Prevent SIGFPE on entity tile loading issue. (#5178)

    sofar committed Feb 6, 2017
    While experimenting with entities I ran into this unresolvable
    error where the server is sending some texture that the client
    crashes on. The crash prevents the client from ever reconnecting,
    resulting in a server that has to use clearobjects.
    We shouldn't crash but just ignore the object and move on.
    0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh",
        baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744
        1744					u32 xscale = scaleto / dim.Width;
        (gdb) bt
        #0  0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh",
            baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744
    After reconnecting, the client now can connect without issues
    and displays an error message:
    ERROR[Main]: generateImagePart(): Illegal 0 dimension for part_of_name="[applyfiltersformesh", cancelling.
    ERROR[Main]: generateImage(): Failed to generate "[applyfiltersformesh"
    ERROR[Main]: Irrlicht: Invalid size of image for OpenGL Texture.
Commits on Jan 23, 2017
  1. core: Add dir_to_yaw and yaw_to_dir helpers

    sofar authored and paramat committed Jan 12, 2017
    These are needed to go from things like entity yaw to a vector
    and vice versa.
  2. Vector: Add vector.sort(a, b): return box edges

    sofar authored and paramat committed Jan 12, 2017
    This function returns the box corners of the smallest box
    that includes the two given coordinates.
Commits on Dec 28, 2016
  1. Redo light.cpp.

    sofar committed Dec 9, 2016
    Remake the light_decode_table.
    The table starts out without pre-filled in values since those
    are always discarded by the code apparently. We calculate a
    pseudo curve with gamma power function, and then apply a new
    adjustment table.
    The adjustment table is setup to make the default gamma of 2.2
    look decent: not too dark at light level 3 or so, but too dark
    at 1 and below to be playable. The curve is much smoother than
    before and looks reasonable at the whole range, offering a
    pleasant decay of light levels away from lights.
    The `display_gamma` setting now actually does something logical:
    the game is darker at values below 2.2, and brighter at values
    above 2.2. At 3.0, the game is very bright, but still has a good
    light scale. At 1.1 or so, the bottom 5 light levels are virtually
    black, but you can still see enough detail at light levels 7-8,
    so the range and spread is adequate.
    I must add that my monitor is somewhat dark to begin with, since
    I have a `hc` screen that doesn't dynamic range colors or try to
    pull up `black` pixels for me (it is tuned for accurate color and
    light levels), so this should look even better on more dynamic
    display tunings.
Commits on Dec 16, 2016
  1. Mapgen: Make mgv7 the default in UI

    sofar authored and paramat committed Dec 16, 2016
    The actual menu default comes from defaultsettings.cpp.
Commits on Dec 8, 2016
  1. Simple decorations: Fix range check for deco->deco_param2

    sofar authored and paramat committed Dec 7, 2016
    Allow any int value, and properly range check it before casting.
Commits on Dec 7, 2016
  1. Simple deco: Allow setting param2 value on placement

    sofar authored and paramat committed Dec 7, 2016
    Schematics can already be placed with a param2 value, but not
    simple 1-node plant decorations of the simple type.
    This adds a `param2` field to the simple deco type that is
    checked to be between 0 and 255, and put to the placed node
    at mapgen.
    This can be used to put a degrotate value in, or e.g. a fill
    value for leveltype nodes, or a place_param2 value at mapgen
    placement, or vary the shape of meshoptions plantlike drawtype.
Commits on Nov 18, 2016
  1. Builtin/../item: Enable tool breaking sounds

    sofar authored and paramat committed Jan 23, 2016
    If a tool wears out and is destroyed, it's itemstack count
    goes to 0, and we can optionally play a breaking sound.
    This patch implements playing a breaking sound when this
    occurs. Sounds need to be added to the tool itemdef
    registration as the sound name string in the .sound.breaks
Commits on Oct 31, 2016
Commits on Sep 12, 2016
  1. Plantlike meshoptions: fix degrotate. (#4512)

    sofar committed Sep 12, 2016
    This snuck in with the meshoptions patch and accidentally kills
    degrotate plants. Thanks to @HybridDog for finding this.
Commits on Aug 26, 2016
  1. Make plantlike drawtype more fun

    sofar authored and paramat committed Dec 11, 2015
    Adds several new ways that the plantlike drawtype mesh can be changed.
    This requires paramtype2 = "meshoptions" to be set in the node
    definition. The drawtype for these nodes should be "plantlike".
    These modifications are all done using param2. This field is now
    a complex bitfield that allows some or more of the combinations to
    be chosen, and the mesh draw code will choose the options based as
    neeeded for each plantlike node.
    bit layout:
    bits 0, 1 and 2 (values 0x1 through 0x7) are for choosing the plant
    mesh shape:
      0 - ordinary plantlike plant ("x" shaped)
      1 - ordinary plant, but rotated 45 degrees ("+" shaped)
      2 - a plant with 3 faces ("*" shaped)
      3 - a plant with 4 faces ("#" shaped)
      4 - a plant with 4 faces ("#" shaped, leaning outwards)
      5 through 7 are unused and reserved for future mesh shapes.
    bit 3 (0x8) causes the plant to be randomly offset in the x,z
    plane. The plant should fall within the 1x1x1 nodebox if regularly
    bit 4 (0x10) causes the plant mesh to grow by sqrt(2), and will cause
    the plant mesh to fill out 1x1x1, and appear slightly larger. Texture
    makers will want to make their plant texture 23x16 pixels to have the
    best visual fit in 1x1x1 size.
    bit 5 (0x20) causes each face of the plant to have a slight negative
    Y offset in position, descending up to 0.125 downwards into the node
    below. Because this is per face, this causes the plant model to be
    less symmetric.
    bit 6 (0x40) through bit 7 (0x80) are unused and reserved for
    future use.
Commits on Jun 17, 2016
  1. Builtin/game/item: Add `place_param2` nodedef field

    sofar authored and paramat committed May 30, 2016
    This allows a nodedef to specify a fixed value for param2 to be
    used for all normal placements.
    There are several uses for this:
    - nodes that require param2 to be set to a non-zero value for
      internal mod use. E.g. leafdecay could use this to detect that
      leaves are played by players.
    - force wallmounted or facedir value at placement at placement
    This overrides any player look direction or other on-the-fly
    param2 setting during placement.
Commits on May 28, 2016
  1. Particles: Add option to remove particles on collision

    sofar authored and kwolekr committed May 28, 2016
    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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.