Commit Graph

230 Commits (master)

Author SHA1 Message Date
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
Dániel Juhász 325bf68041 Raycast: export exact pointing location (#6304)
* Return intersection point in node coordinates.
* Clarify 'intersection_point' documentation
2018-08-16 20:10:08 +02:00
Ben Deutsch 153fb211ac Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
2018-08-05 13:13:38 +02:00
SmallJoker f3997025fd Smoothed yaw rotation for objects (#6825) 2018-08-02 23:25:37 +01:00
zeuner d7d451c647 Fix build on gcc 5.0 (#7586) 2018-07-26 21:49:38 +02:00
HybridDog 53dd781927 Fix memory leak in guiConfirmRegistration 2018-07-06 11:13:18 +02:00
red-001 7bdf5eae05 Fix buffer overrun in SRP (#7484)
The old code got a pointer to the array instead of the first element, this resulted in a buffer overflow when the function was used more than once.
2018-06-26 10:02:26 +02:00
sfan5 b298b0339c Fix MurmurHash implementation to really be unaligned (#7482) 2018-06-26 00:12:09 +01:00
Lars Hofhansl a1868e8f6c Use server's zoom fov for distant world loading. 2018-05-15 18:49:11 -07:00
Thomas--S 9577a4396a Formspecs: Allow setting alpha value for the box[] element 2018-04-23 18:50:50 +01:00
Paramat c6975febba
Zoom adjustDist(): Improve variable name (#7208) 2018-04-05 20:15:38 +01:00
Loic Blot 8e0b80aa36
Fix last performance-type-promotion-in-math-fn problems 2018-04-04 07:42:40 +02:00
Loïc Blot a90d27e1e2
Optimize a little bit isBlockInSight, adjustDist & collisions (#7193)
* Use constexpr + unroll some calculations to cache definitively some calculations
* Unroll some calls in collision code & use a constref instead of a copy in one occurence
2018-04-04 00:43:08 +02:00
Loic Blot 05fe3b06c8
Fix last clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/361810382 output

Also fix 2 missing copyright notices
2018-04-03 23:05:22 +02:00
Loïc Blot 67a4cb7d8a Fix various clang-tidy reported performance-type-promotion-in-math-fn 2018-04-03 18:16:17 +02: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
you e7b44c3295 Fix Wstringop-overflow warning from util/srp.cpp (#6855)
* Fix Wstringop-overflow warning from util/srp.cpp
2018-01-04 14:25:20 +01:00
rubenwardy 026ad912af Fix rounding error in g/set_node caused by truncation to float 2017-12-26 21:55:08 +00:00
adrido 551c12391a directiontables: Fix MSVC compiler error (#6785) 2017-12-14 19:46:42 +01: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
Loic Blot f36e323175
directiontables.cpp: fix a warning reported by VS2017 2017-10-17 22:29:15 +02:00
Vitaliy 75320e7e88 Real global textures (#6105)
* Real global textures

* Add world-aligned textures
* Update minimal to support world-aligned tiles
* Update minimal
2017-10-15 09:34:14 +02:00
Loic Blot a3c298e1d1
Use a Buffer instead of SharedBuffer in ConnectionCommand
This fixes #6373
2017-09-05 22:14:56 +02:00
Loïc Blot bd6b90359c Remove DSTACK support (#6346)
Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
2017-08-30 08:09:41 +02:00
Loïc Blot 3cea7a349a Network cleanup (#6310)
* Move Connection threads to dedicated files + various cleanups

* ConnectionReceiveThread::processPacket now uses function pointer table to route MT packet types
* Various code style fixes

* Code style with clang-format

* Various SharedBuffer copy removal

* SharedBuffer cannot be copied anymore using Buffer
* Fix many SharedBuffer copy (thanks to delete operator)
2017-08-25 15:53:56 +02:00
Ekdohibs 6761e21383 Translations: prevent remote crash with invalid translations 2017-08-25 13:06:59 +02:00
Ekdohibs b24e6433df Add clientside translations. 2017-08-24 17:54:10 +02:00
Loïc Blot e2a6b7c8d2 serialize: use a temporary for SerializeException
Exception must always use temporary instead of global copied exception instances, it's not recommended and should have undefined issues
2017-08-21 16:07:39 +02: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 88b436e6a9 Code modernization: subfolders (#6283)
* Code modernization: subfolders

Modernize various code on subfolders client, network, script, threading, unittests, util

* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Make connection.cpp readable in a pointed place + typo
2017-08-19 22:23:47 +02:00
Loic Blot b5f7249a7e
Code modernization: src/m* (part 2)
* empty function
* default constructor/destructor
* remove unused Map::emergeSector(a,b)
* for range-based loops
* migrate a dirs[7] table to direction tables
* remove various old unused function
2017-08-19 09:12:54 +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
Dániel Juhász 3caad3f3c9 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2017-07-07 22:28:23 +01: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
QrchackOfficial 5cc8ad946e Remove superfluous pointer null checks 2017-06-10 21:04:47 -04:00
Loïc Blot ab128e03ff C++11 patchset 6: forbid object copy using assigment/copy function deleters (#5945)
C++11 implement function deleting, it's generally used to prevent some object copy
In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis
Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place
2017-06-10 13:49:15 +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
Loic Blot 718121df91
Remove SharedPtr, it's not used and will be never used, we use C++11 2017-06-05 09:36:13 +02:00
Loïc Blot a98baef5e4 C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821) 2017-06-04 21:00:04 +02:00
SmallJoker d99b6fed55 Time: Change old `u32` timestamps to 64-bit (#5818)
MacOSX build fix + cleanups
2017-05-26 14:03:36 +02:00
red-001 0e0c824ea7 Rework escape/pause menu (#5719)
* Rework escape/pause menu

- Remove build information
- Use current controls instead of default controls
- Add information about the current server in place of the build information
- Add text saying the game is paused to if in singleplayer mode.
rework pause/escape menu

* improve consistency + display server_name
2017-05-11 10:39:37 +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
ShadowNinja b662a4577d Clean up getTime helpers
This increases size of the getTime return values to 64 bits.
It also removes the TimeGetter classes since the getTime functions
are now very precise.
2017-04-28 14:43:18 -04:00
Loïc Blot a7e131f53e Fix various points reported by cppcheck (#5656)
* Fix various performance issues reported by cppcheck + code style (CI)

* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function

* Fix various iterator post-increment reported by cppcheck
2017-04-25 10:21:42 +02:00
Loïc Blot f98bbe193e Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
2017-04-20 00:12:52 +02:00