Commit Graph

46 Commits

Author SHA1 Message Date
hecks 225e69063f
Keep mapblocks in memory if they're in range (#10714)
Some other minor parts of clientmap.cpp have been cleaned up along the way
2021-02-26 21:23:46 +01:00
Hugues Ross f780bae05c
Formspecs: Add state-selection to style elements (#9378) 2020-04-11 21:39:30 +01:00
Paul Ouellette d5456da69d Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)
Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues.

Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
2019-02-07 21:26:06 +00:00
CoderForTheBetter faa358e797 Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-11-28 09:38:50 +01:00
Vitaliy 79e393cf4b Light curve: Simplify and improve code, fix darkened daytime sky (#7693) 2018-09-16 17:59:42 +01:00
SmallJoker f3997025fd Smoothed yaw rotation for objects (#6825) 2018-08-02 23:25:37 +01:00
Lars Hofhansl fad263dec9 Revert "Add an active object step time budget #6721"
This reverts commit 9c669016d1.
See #6907
2018-01-12 23:47:39 -08:00
rubenwardy 026ad912af Fix rounding error in g/set_node caused by truncation to float 2017-12-26 21:55:08 +00:00
Lars Hofhansl 9c669016d1 Add an active object step time budget #6721
This can be set via the active_object_interval option.
2017-12-06 12:21:54 -08:00
Lars Hofhansl ae9b1aa177 Allow zoom to actually show more data.
This allows the client to retrieve blocks at a greater distance
from the server, thus allowing for a real zoom.
2017-11-15 22:03:58 -08:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
Jens Rottmann 9d8cb510b3 Change BS constant from implicit double to float (#6286)
the BS constant
implicitly promotes all position calculations it is used in to double even
though positions (= v3f) are only meant to be floats.

There are many, many similar occurrences everywhere, but I'm not willing to
hunt down all; I only fixed the little part I'm already familiar with.
2017-08-20 19:37:55 +02:00
Loïc Blot 1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
Loïc Blot 921151d97a C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
2017-08-17 22:19:39 +02:00
Vincent Glize 4a5e8ad343 C++11 cleanup on constructors (#6000)
* C++11 cleanup on constructors dir script
2017-06-19 23:54:58 +02:00
Loïc Blot d4c0f91275 Use C++11 mutexes only (remove compat code) (#5922)
* Fix event LINT & remove default constructor/destructors
* remove compat code & modernize autolock header
2017-06-06 16:29:28 +02:00
ShadowNinja c6e96c645b Fix myfloor(0.0) 2017-05-06 16:10:03 -04:00
ShadowNinja 77597c4ff3 Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
2017-05-06 16:09:45 -04:00
number Zero 25a24c0cdf Minimap: Optimise 2017-03-11 02:15:21 +00:00
Loic Blot 155288ee98 use unordered containers where possible (patch 4 on X)
Also remove some unused parameters/functions
2016-10-06 22:37:26 +02:00
nerzhul fefa148d69 v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
est31 eabfe091b5 Rename and move basicmacros.h to util/basic_macros.h 2015-11-02 04:57:55 +01:00
kwolekr 27eed1389b Move basic, non-numeric macros from util/numeric.h to basicmacros.h 2015-10-27 01:53:45 -04:00
ShadowNinja e4bff8be94 Clean up threading
* 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.
2015-08-23 22:04:06 -04:00
Břetislav Štec abe6c072d6 src/util/numeric.{cpp,h}: Fix FacePositionCache data race 2015-08-02 19:42:22 +02:00
SmallJoker 6626a3f72f Fix several MSVC issues numeric.h
-> Round negative numbers correctly CMakeLists.txt
-> Link Json with the static run-time library
2015-05-01 07:34:51 +02:00
Aaron Suen 6d61375cc7 Clean scaling pre-filter for formspec/HUD. 2015-04-01 00:01:05 -04:00
kwolekr 699e066bea Fix set_bits 2015-03-31 23:30:44 -04:00
kwolekr ed10005d38 GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-31 01:11:51 -04:00
kwolekr 3993093f51 Add support for the PCG32 PRNG algo (and associated script APIs) 2015-03-22 00:48:08 -04:00
Craig Robbins 3b6480c5b0 Fix wrapDegrees family of functions
wrapDegrees() (renamed to modulo360f)
wrapDegrees_0_360
wrapDegrees_180

Minor errors were present in previous versions; see issue #2328
2015-02-23 22:50:32 +10:00
Loic Blot 7c8793cbea Performance Improvement: Use a cache which caches result for getFacePositions.
This greatly reduce the number of std::list generated by caching the result, which is always constant for each radius selected.
In the callgrind map, you will see original:
  * 3.3M calls to std::list for 9700 calls to getFacePositions
In the modified version, you will see:
  * 3.3K calls to std::list for 6900 call to getFacePositions
Callgrind map is here: #2321

it's a huge performance improvement to l_find_node_near
2015-02-16 11:27:44 +01:00
gregorycu db3466dbe8 Water fixes
Change must_reflow to a deque
Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement.
Comment out unused variable
Optimisations to block offset calculations
2015-01-18 20:30:33 +10:00
Kahrl 55e4c35eaf Remove unused rangelim function (the macro still exists) 2014-11-19 10:19:52 +01:00
Kahrl 9b551d5cbc Implement WieldMeshSceneNode which improves wield mesh rendering
- Don't create and cache an extruded mesh for every (non-node) item.
  Instead use a single one per image resolution.

- For cubic nodes reuse a single wield mesh too

- Improve lighting of the wielded item

- Increase far value of wield mesh scene camera, fixes #1770

- Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08 23:11:57 +01:00
kwolekr 1cb6ea6346 Refactor decoration-related code
Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
2014-10-29 01:56:37 -04:00
kwolekr e46c527733 Accept hexadecimal and string values for seeds 2013-11-04 23:59:26 -05:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
proller 3aedfac968 Weather support 2013-07-27 23:21:48 +04:00
kwolekr c1b829077a Decoration: Add Schematic decoration type 2013-06-22 01:11:52 -04:00
Ilya Zhuravlev 6a1670dbc3 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
kwolekr 11afcbff69 The new mapgen, noise functions, et al. 2013-01-21 21:41:33 +02:00
Perttu Ahola 9f031a6759 Optimize headers 2012-06-17 04:03:39 +03:00
Perttu Ahola 1bc37d576c Initially split utility.h to multiple files in util/ 2012-06-17 01:29:13 +03:00