10904 Commits

Author SHA1 Message Date
proller
2c1893c76f CMakeLists.txt: reduce conflicts 2022-02-25 00:48:37 +03:00
proller
807ca669e6 Move anything from build to build_tools 2022-02-21 02:30:48 +03:00
proller
80629f40a8 Fix falling snow stacking 2021-11-18 00:03:45 +03:00
proller
1419a65438 No dungeons in ice 2021-11-17 00:17:40 +03:00
proller
bd0f9e6985 Try avoid flying square freezed blocks 2021-11-16 00:41:34 +03:00
Lean Rada
346c6e3956 Optimize vector length calculations (#11549) 2021-11-16 00:32:14 +03:00
DS
af439ddb9a Add vector.to_string and vector.from_string (#10323)
Writing vectors as strings is very common and should belong to `vector.*`. `minetest.pos_to_string` is also too long to write, implies that one should only use it for positions and leaves no spaces after the commas.
2021-11-16 00:27:56 +03:00
Vincent Robinson
faaff0d777 Add math.round and fix vector.round (#10803) 2021-11-16 00:27:54 +03:00
DS
fc1e5e14e1 Add vector.offset (#10321) 2021-11-16 00:27:41 +03:00
NetherEran
22440a5db5 Some vector functions useful for working with rotations (#9572)
* added vector.rotate

* added vector.forward_from_rotation and vector.up_from_rotation

* added vector.forward_up_to_rotatiton

* fixed some bugs and formatting with vector functions

* shortened name of some new vector functions and added documentation

* made vector.rotate not require a unit vector as axis

* fixed crash with vector.forward_up_to_rot

* renamed new vector functions, made vector.rotate apply a rotation matrix, old vector.rotate is now called vector.rotate_around_axis

* documented vector function changes

* removed some whitespace to appease luacheck

* implemented and fixed optimization of vector.rotate_around_axis by SmallJoker

* added some unit tests for rotation vector functions

* clarified that rotation vectors are in radians and according to the left hand rule

* hopefully appeased luacheck

* renamed rotation_to_horizontal to forward_at_rotation, rotation_to_vertical to up_at_rotation

* handled cases where sin or cos are 0 in rotation vector functions

* added more comments

* clarified documentation of rotation vector functions

* added more unit tests

* changed way in which vector.rotate_around_axis is adjusted for left handed coordinate systems

* made vector.rotate_around_axis actually left handed

* unrolled matrix multiplication

* removed vector.forward_at_rotation and vector.up_at_rotation

* prettified vector.rotate_around_axis, made previous commits not break anything

* removed references to removed vector.forward_at_rotation and vector.up_at_rotation

* removed documentation of removed vector functions

* clarified documentation and fixed styling of rotation vector functions

* restyled comments minorly

* spelling fixes and some hopefully better comments

* allowed 'up' to be missing from vector.directions_to_rotation and removed requirement for unit vectors as arguments

* made vector.rotate_around_axis() right handed again for consistency

* documented previous changes

* made matrix multiplication actually multiply

* renamed vector.directions_to_rotation() to vector.dir_to_rotation()

* optimized a distance comparison

* Fixed potential false positive in unit tests.

Co-authored-by: NetherEran <nethereran@hotmail.com>
2021-11-16 00:27:39 +03:00
HybridDog
df6d90913d Use vector.dot and vector.cross in vector.angle 2021-11-16 00:27:06 +03:00
HybridDog
788ff081cc Add vector.dot and vector.cross
Mostly copied from MarkuBu's code
2021-11-16 00:27:06 +03:00
ANAND
0dd672c4b3 Builtin: Add vector.angle(). Returns the angle between 2 vectors (#7738) 2021-11-16 00:27:04 +03:00
Paramat
5cb75c5b7d Vector functions: Fix vector.direction() function, improve documentation (#6801)
vector.direction() now returns a normalised vector with direction p1 to p2.
2021-11-16 00:26:28 +03:00
Auke Kok
a2e2d40745 Vector: Add vector.sort(a, b): return box edges
This function returns the box corners of the smallest box
that includes the two given coordinates.
2021-11-16 00:26:28 +03:00
proller
bf3fd66f9e Fix saving extended_attributes 2021-11-15 20:38:48 +03:00
proller
08d513eee1 Update default 2021-11-15 04:29:13 +03:00
TeTpaAka
fcb1819f8d Player collisionbox: Make settable
Breaks compatibility with old clients.
2021-11-15 04:28:54 +03:00
proller
96d40a12b6 Update submodules 2021-11-14 18:45:26 +03:00
paramat
47322de803 Gennotify: Add 'minetest.get_decoration_id' API
Returns the decoration ID for the provided decoration name string.
For use with gennotify, to know the decoration IDs for use in
'minetest.set_gen_notify'.
2021-11-14 18:45:26 +03:00
proller
b25f3cf56c Fixes 2021-11-14 05:12:15 +03:00
Loïc Blot
a4cac3613a Implement player attribute backend (#4155)
* This backend permit mods to store extra players attributes to a common interface.
* Add the obj:set_attribute(attr, value) Lua call
* Add the obj:get_attribute(attr) Lua call

Examples:
* player:set_attribute("home:home", "10,25,-78")
* player:get_attribute("default:mana")

Attributes are saved as a json in the player file in extended_attributes
key

They are saved only if a modification on the attributes occurs and loaded
when emergePlayer is called (they are attached to PlayerSAO).

 Author:    Loïc Blot <nerzhul@users.noreply.github.com>
 Date:      Fri Jan 27 08:59:30 2017 +0100
 You are currently cherry-picking commit b7a98e985.
2021-11-14 04:58:45 +03:00
rubenwardy
e21edd121f Rename ObjectRef methods to be consistent and predictable
Author:    rubenwardy <rubenwardy@gmail.com>
 Date:      Mon Jan 16 13:08:59 2017 +0000
 You are currently cherry-picking commit 63c892eed.
2021-11-14 03:27:38 +03:00
ShadowNinja
44c489d7bd Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.

 Author:    ShadowNinja <shadowninja@minetest.net>
 Date:      Fri Dec 12 14:49:19 2014 -0500
 You are currently cherry-picking commit 43d1f375d.
2021-11-14 03:15:12 +03:00
proller
65fd685d52 Farmesh: bit better 2021-10-31 03:00:19 +03:00
proller
48f4df6d57 Farmesh: less lag on camera rorate 2021-10-28 06:15:13 +03:00
proller
180352511b Mapgen v7, math: fix dusting ice with sand 2021-10-28 04:26:47 +03:00
proller
543b962241 Fix finding spawnpoint 2021-09-05 21:41:57 +03:00
proller
a16be7177b static_spawnpoint_find 2021-08-25 00:02:03 +03:00
proller
5c8e14b0b8 Update submodules 2021-08-19 01:43:46 +03:00
proller
3842f62d9f Tune weather apmlitude 2021-08-14 15:57:58 +03:00
proller
2ff8e53cbe cmake: fix msgpack find 2021-08-13 20:05:26 +03:00
proller
e252e2c10e mapgen math: better rooms limit 2021-08-11 18:06:57 +03:00
proller
82043d019f light_ambient setting 2021-08-10 01:08:12 +03:00
proller
ae62cf2eda Mapgen math: room fixes 2021-08-09 23:20:43 +03:00
proller
0d63dcf339 Update submodule 2021-08-09 04:31:53 +03:00
proller
0b502fe23d Increase block humidity from water 2021-08-09 04:27:13 +03:00
proller
2fdfdc5f8f Fix freebsd build 2021-04-02 23:09:54 +03:00
proller
7e3a34a0ff Update jsoncpp 2020-11-07 18:29:43 +03:00
proller
0c6280f042 Fix build 2020-11-07 18:29:07 +03:00
proller
5d2f00fa77 Fix fnv_32_buf (previous works wrong on some archs) 2020-01-03 00:27:23 +03:00
proller
70499cbd62 timelapse_stay 2019-10-25 19:36:13 +03:00
proller
69b31a1732 Fixes 2019-01-20 00:00:03 +03:00
proller
18fda8bb0b Update submodules 2019-01-19 13:37:51 +03:00
proller
a8e93bb6aa build fixes 2018-09-24 16:19:04 +03:00
proller
6c2206a041 Build fixes 2018-09-24 16:15:52 +03:00
proller
0f5535d69f Build fixes 2018-09-22 15:20:25 +03:00
proller
708623a4fc Build fix 2018-09-20 16:25:56 +03:00
proller
0c01416232 Try build with msvc2017 2018-09-19 23:28:38 +03:00
proller
c29643053e Allow use system enet 2018-08-05 20:54:43 +03:00