Skip to content
Snippets Groups Projects
  1. May 10, 2016
  2. May 09, 2016
  3. May 08, 2016
  4. May 07, 2016
  5. May 06, 2016
  6. May 05, 2016
  7. May 04, 2016
  8. May 03, 2016
  9. May 02, 2016
    • Zeno-'s avatar
      Fix Windows build · c92cff5d
      Zeno- authored
      Fixes the issue introduced by c1a0ebb7 (Fix use of uninitialised variable
      in class Event) causing Windows builds to fail
      c92cff5d
  10. May 01, 2016
    • Kahrl's avatar
    • Auke Kok's avatar
      find_path: consider walkable instead of CONTENT_AIR · aa8c88cf
      Auke Kok authored
      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.
      aa8c88cf
    • est31's avatar
      Pathfinder: improve GridNode storage · 9aec701a
      est31 authored
      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.
      9aec701a
    • est31's avatar
      Pathfinder: use core::aabbox3d instead of own type · f0de237d
      est31 authored
      There is no need to reinvent the wheel here, we have
      great classes from irrlicht.
      f0de237d
    • est31's avatar
      Pathfinder: Fix style · ac8bb457
      est31 authored
      * 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
      ac8bb457
    • est31's avatar
      Move pathfinder classes to cpp file · 46e5ef4e
      est31 authored
      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.
      46e5ef4e
    • Zeno-'s avatar
      Fix use of uninitialised variable in class Event · c1a0ebb7
      Zeno- authored
      c1a0ebb7
    • gregorycu's avatar
      c9573465
    • Rui's avatar
      Mainmenu: Remove space under mod list · 29877dfb
      Rui authored
      29877dfb
    • Rui's avatar
      Translated using Weblate (Japanese) · 0d40bb83
      Rui authored
      Currently translated at 51.7% (448 of 865 strings)
      
      This is a merger of two commits.
      0d40bb83
    • Emon Omen's avatar
      Translated using Weblate (Italian) · 6667ffc0
      Emon Omen authored
      Currently translated at 100.0% (865 of 865 strings)
      
      This is a merger of two commits.
      6667ffc0
    • Claybiokiller's avatar
      Translated using Weblate (Chinese (China)) · 3de452e0
      Claybiokiller authored
      Currently translated at 75.4% (653 of 865 strings)
      3de452e0
    • Joan Ciprià Moreno Teodoro's avatar
      Translated using Weblate (Catalan) · 2a12ebd6
      Joan Ciprià Moreno Teodoro authored
      Currently translated at 46.5% (403 of 865 strings)
      
      This is a merger of two commits.
      2a12ebd6
    • Thomas Wagner Nielsen's avatar
      Translated using Weblate (Danish) · b2b8c49d
      Thomas Wagner Nielsen authored
      Currently translated at 28.7% (249 of 865 strings)
      b2b8c49d
Loading