Skip to content
Snippets Groups Projects
  1. Oct 06, 2016
  2. Oct 05, 2016
    • Loïc Blot's avatar
      Replace various std::map with UNORDERED_MAP + various cleanups · 613797a3
      Loïc Blot authored
      This is part 2 for 5f084cd9
      
      Other improvements:
      
      * Use the defined ItemGroupList when used
      * make Client::checkPrivilege const
      * inline some trivial functions
      * Add ActiveObjectMap typedef
      * Add SettingsEntries typedef
      613797a3
    • Loïc Blot's avatar
      Chat: new settings to prevent spam · d4c76258
      Loïc Blot authored
      Added the following chat coreside features
      * Chat messages length limit
      * Message rate limiting
      * Message rate kicking
      
      Note:
      * handleChat now takes RemotePlayer pointer instead of u16 to remove useless
        lookups
      d4c76258
  3. Aug 22, 2016
  4. Jul 03, 2016
    • kwolekr's avatar
      Add MapSettingsManager and new mapgen setting script API functions · 3c63c304
      kwolekr authored
      This commit refactors the majority of the Mapgen settings system.
      - MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
        instead of the EmergeManager.
      - New Script API functions added:
          core.get_mapgen_setting
          core.get_mapgen_setting_noiseparams,
          core.set_mapgen_setting, and
          core.set_mapgen_setting_noiseparams.
      - minetest.get/set_mapgen_params are deprecated by the above new functions.
      - It is now possible to view and modify any arbitrary mapgen setting from a mod,
        rather than the base MapgenParams structure.
      - MapgenSpecificParams has been removed.
      3c63c304
  5. Jun 11, 2016
  6. May 28, 2016
    • Auke Kok's avatar
      Particles: Add option to remove particles on collision · d499ec48
      Auke Kok authored
      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.
      d499ec48
  7. May 08, 2016
  8. Apr 27, 2016
  9. Mar 12, 2016
    • Auke Kok's avatar
      Nodebox: Allow nodeboxes to "connect" · e737b1c2
      Auke Kok authored
      We introduce a new nodebox type "connected", and allow these nodes to
      have optional nodeboxes that connect it to other connecting nodeboxes.
      
      This is all done at scenedraw time in the client. The client will
      inspect the surrounding nodes and if they are to be connected to,
      it will draw the appropriate connecting nodeboxes to make those
      connections.
      
      In the node_box definition, we have to specify separate nodeboxes for
      each valid connection. This allows us to make nodes that connect only
      horizontally (the common case) by providing optional nodeboxes for +x,
      -x, +z, -z directions. Or this allows us to make wires that can connect
      up and down, by providing nodeboxes that connect it up and down (+y,
      -y) as well.
      
      The optional nodeboxes can be arrays. They are named "connect_top,
      "connect_bottom", "connect_front", "connect_left", "connect_back" and
      "connect_right". Here, "front" means the south facing side of the node
      that has facedir = 0.
      
      Additionally, a "fixed" nodebox list present will always be drawn,
      so one can make a central post, for instance. This "fixed" nodebox
      can be omitted, or it can be an array of nodeboxes.
      
      Collision boxes are also updated in exactly the same fashion, which
      allows you to walk over the upper extremities of the individual
      node boxes, or stand really close to them. You can also walk up
      node noxes that are small in height, all as expected, and unlike the
      NDT_FENCELIKE nodes.
      
      I've posted a screenshot demonstrating the flexibility at
          http://i.imgur.com/zaJq8jo.png
      In the screenshot, all connecting nodes are of this new subtype.
      
      Transparent textures render incorrectly, Which I don't think is
      related to this text, as other nodeboxes also have issues with this.
      
      A protocol bump is performed in order to be able to send older clients
      a nodeblock that is usable for them. In order to avoid abuse of users
      we send older clients a "full-size" node, so that it's impossible for
      them to try and walk through a fence or wall that's created in this
      fashion. This was tested with a pre-bump client connected against a
      server running the new protocol.
      
      These nodes connect to other nodes, and you can select which ones
      those are by specifying node names (or group names) in the
      connects_to string array:
            connects_to = { "group:fence", "default:wood" }
      By default, nodes do not connect to anything, allowing you to create
      nodes that always have to be paired in order to connect. lua_api.txt
      is updated to reflect the extension to the node_box API.
      
      Example lua code needed to generate these nodes can be found here:
          https://gist.github.com/sofar/b381c8c192c8e53e6062
      e737b1c2
  10. Mar 11, 2016
    • orwell96's avatar
      Fix ask_reconnect_on_crash option being ignored · 0d2df732
      orwell96 authored
      Since commit
      
      3b50b276 "Optional reconnect functionality"
      
      there is a config option named ask_reconnect_on_crash.
      It asks the client to reconnect to the server if the server crashed.
      It has been implemeted and works, but due to a function parameter not
      being passed it never showed effect. This patch adds the parameter
      and fixes the bug.
      
      Also fixes the `reconnect` option of minetest.request_shutdown being ignored.
      0d2df732
  11. Mar 07, 2016
  12. Feb 26, 2016
  13. Feb 09, 2016
    • paramat's avatar
      FindSpawnPos: Let mapgens decide what spawn altitude is suitable · 4adbd69a
      paramat authored
      To avoid spawn search failing in new specialised mapgens
      Increase spawn search range to 4000 nodes
      Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
      and all mapgens
      Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
      (possibly to be re-added later in the correct form to return actual
      ground level)
      Make mgvalleys flag names consistent with other mapgens
      Remove now unused 'vertical spawn range' setting
      4adbd69a
  14. Nov 22, 2015
    • est31's avatar
      Update HUD flags on server like on client · a4e3ed01
      est31 authored
      Fixes bug for which commit
      
      6c37e89f "Fix old client showing duplicated health bar on new server"
      by @sapier
      
      laid the groundwork, where the server has
      updated its copy of the hud flags without
      respecting the mask.
      
      Fixes #3395.
      a4e3ed01
  15. Nov 13, 2015
  16. Nov 09, 2015
  17. Nov 08, 2015
  18. Nov 06, 2015
    • est31's avatar
      Add server side ncurses terminal · 5e507c98
      est31 authored
      This adds a chat console the server owner can use for administration
      or to talk with players.
      It runs in its own thread, which makes the user interface immune to
      the server's lag, behaving just like a client, except timeout.
      As it uses the same console code as the f10 console, things like nick
      completion or a scroll buffer basically come for free.
      The terminal itself is written in a general way so that adding a
      client version later on is just about implementing an interface.
      
      Fatal errors are printed after the console exists and the ncurses
      terminal buffer gets cleaned up with endwin(), so that the error still
      remains visible.
      
      The server owner can chose their username their entered text will
      have in chat and where players can send PMs to.
      Once the username is secured with a password to prevent anybody to
      take over the server, the owner can execute admin tasks over the
      console.
      
      This change includes a contribution by @kahrl who has improved ncurses
      library detection.
      5e507c98
  19. Nov 03, 2015
    • est31's avatar
      Time: Remove serverside getter, and use atomic operations · f9b09368
      est31 authored
      It isn't possible to use atomic operations for floats, so don't use them there.
      
      Having a lock is good out of other reasons too, because this way the float time
      and the integer time both match, and can't get different values in a race,
      e.g. when two setTimeofDay() get executed simultaneously.
      f9b09368
  20. Oct 31, 2015
    • ShadowNinja's avatar
      Fix server crashing on Lua errors · 9269a0ec
      ShadowNinja authored
      Previously, the server called FATAL_ERROR when a Lua error occured.
      This caused a (mostly useless) core dump.
      The server now simply throws an exception, which is caught and printed before
      exiting with a non-zero return value.
      This also fixes a number of instances where errors were logged multiple times.
      9269a0ec
  21. Oct 29, 2015
    • paramat's avatar
      findSpawnPos: Add setting for max height above water level · c0a7c670
      paramat authored
      Increase default from 6 to 16 to help with mgv7 and mgfractal
      Large-scale or alternative mapgens can result in a lowland spawn point not
      being found, causing a spawn at (0, 0, 0) possibly buried underground
      The max height is now settable to allow correct player spawn
      in any mapgen or when using custom noise parameters
      c0a7c670
  22. Oct 27, 2015
    • est31's avatar
      Environment: Time of day fixes and add serverside getter · ca8e56c1
      est31 authored
      -> Put access to time variables under the time lock.
      -> Merge both time locks, there is no point to have two locks.
      -> Fix the lock being released too early in Environment::setTimeOfDay
      -> Add serverside getter so that you don't have to get
      	the environment if you only have the server
      ca8e56c1
  23. Oct 14, 2015
  24. Oct 04, 2015
  25. Sep 29, 2015
    • est31's avatar
      Some map border related fixes · 2a7d01b8
      est31 authored
      1. Check for entity addition success in spawn_item implementation
      2. Check for success in item_drop callback, so that the player
      doesn't lose the item if they are outside bounds and try to drop it.
      3. When existing player joins game, check that their position is inside
      map bounds. If not, set their position to the return value of findSpawnPos().
      4. Make findSpawnPos() respect the border
      
      2 fixes a lua crash if a player drops an item outside map bounds.
      3 fixes an assertion crash if a player leaves when being outside map bounds,
      and then rejoins.
      2a7d01b8
  26. Sep 19, 2015
  27. Sep 17, 2015
    • est31's avatar
      Send proper block to old clients for swap_node calls · 94f1e5d9
      est31 authored
      The legacy code added in commit
      
      d879a539 - "Add minetest.swap_node"
      
      for sending the whole mapblock to older clients on the case of a node
      modification with swap_node, had the problem that the block chosen to be
      sent to the client was referenced with node coordinates and not with
      block coordinates, resulting in getting the wrong block sent to the client.
      94f1e5d9
  28. Aug 26, 2015
  29. Aug 24, 2015
    • ShadowNinja's avatar
      Clean up threading · e4bff8be
      ShadowNinja authored
        * Rename everything.
          * Strip J prefix.
          * Change UpperCamelCase functions to lowerCamelCase.
        * Remove global (!) semaphore count mutex on OSX.
        * Remove semaphore count getter (unused, unsafe, depended on internal
          API functions on Windows, and used a hack on OSX).
        * Add `Atomic<type>`.
        * Make `Thread` handle thread names.
        * Add support for C++11 multi-threading.
        * Combine pthread and win32 sources.
        * Remove `ThreadStarted` (unused, unneeded).
        * Move some includes from the headers to the sources.
        * Move all of `Event` into its header (allows inlining with no new includes).
        * Make `Event` use `Semaphore` (except on Windows).
        * Move some porting functions into `Thread`.
        * Integrate logging with `Thread`.
        * Add threading test.
      e4bff8be
  30. Aug 13, 2015
  31. Aug 09, 2015
  32. Aug 02, 2015
  33. Jul 31, 2015
    • Loïc Blot's avatar
      Small SendableMediaAnnouncement cleanup · 05fe9ab2
      Loïc Blot authored
      -> Remove the SendableMediaAnnouncement struct
      -> Forge the packet directly in the m_media loop, spare one loop and the construction of a vector
      -> Use preincrement to spare iterator copies
      05fe9ab2
  34. Jul 25, 2015
Loading