Commit Graph

5413 Commits

Author SHA1 Message Date
Paul Ouellette 3fce27ece5 Fix some misspellings (#8104) 2019-01-16 13:39:13 +01:00
SmallJoker ed1415f78d
world.mt: Only accept true/false/nil values (#8055)
This patch will make distinguishable mods in modpacks possible in the future
`nil` checks are required to provide backwards-compatibility for fresh configured worlds
2019-01-13 16:22:32 +01:00
Jozef Behran a51909bb64 Speed up the craft definition handling (#8097)
The craft definition handling code that collects the names of
the craftable nodes suffers from vector reallocation
performance hits, slowing down instances with lots of
crafting recipes (VanessaE's DreamBuilder and most public
server some to my mind when thinking about this). As in each
instance the size of the resulting vector is already known,
add a reserve() call before the offending loops to allocate
the needed chunk of memory within the result vector in one
go, getting rid of the overhead.
2019-01-13 15:11:47 +01:00
Jozef Behran 5a00b11895 Optimize path finalization in pathfinder (#8100)
The pathfinder needs quite a bunch of items to add to the
resulting list. It turns out the amount of the space needed
for the finalized path is known in advance so preallocate it
to avoid a burst of reallocation calls each time something
needs to look for a path.
2019-01-12 16:57:26 +01:00
Paul Ouellette a18c310adb Make sqlite3 the default auth backend (#8085) 2019-01-10 07:54:20 +01:00
Loic Blot f4099192e3
Import strstr function from FreeBSD 11 libc 2019-01-10 00:17:08 +01:00
Loïc Blot 0acdf93683 Android build fixes
This fixes #8079
2019-01-09 14:39:43 +01:00
Loïc Blot 95d4ff6d1b
Fix a crash on Android with Align2Npot2 (#8070)
* Fix a crash on Android with Align2Npot2

glGetString can be NULL. If stored in a string it triggers a SIGSEGV.
Instead do a basic strstr and verify the pointer
* Better Align2Npot2 check (+ performance)
2019-01-07 17:05:18 +01:00
DS 07c1c72aae Fix wrong code comment (#8061)
"Get core.registered_on_chat_messages" to "Get core.registered_on_player_receive_fields" where `core.registered_on_player_receive_fields` is gotten
2019-01-06 17:21:04 +01:00
SmallJoker a122ba0ef4 Fix various bugs (Anticheat, Lua helpers) (#8013)
* Fix various bugs (Anticheat, Lua helpers)

Anticheat: Use camera position instead of player position for shoot line calculations
Lua helpers: Increase 'i' to not overwrite earlier added table values

* Remove lag compensation

* * 1.5 for larger selection boxes
2019-01-06 10:24:44 +01:00
rubenwardy 70bf3439ab Deprecate modpack.txt and use modpack.conf instead (#7892)
* Deprecate modpack.txt and use modpack.conf instead
2019-01-06 10:23:35 +01:00
Loïc Blot 9854340c0b Drop libgmp on Android and use mini-gmp (#8047) 2019-01-04 16:45:37 +01:00
Loïc Blot 022b1eca0b
Make sqlite3 default auth & player backends for new worlds (#8043)
* Make sqlite3 default auth & player backends for new worlds

Also notify about auth backend depreciation
2019-01-04 12:55:07 +01:00
Loïc Blot 4a7c97c5f6 Fix on_successful_save -> onSuccessfulSave 2019-01-04 11:33:04 +01:00
Loïc Blot c1d7dbfc38 Fix various player save issues (performance penalty on sql backends + bugs)
* PostgreSQL & SQLite3 doesn't setModified(false) on RemotePlayer, then player is saved on each server save call. This results in heavy useless writes.
* PostgreSQL & SQLite3 ack engine meta write whereas db commit hasn't been performed. If commit failed write has failed. We mustn't notify engine write is done.
* serializing player meta must not setModified(false) because it didn't ensure write has been done
* add RemotePlayer::on_successfull_save callback to do the flag update on a successful save
2019-01-04 10:20:04 +01:00
Loïc Blot 0717719073 Player file directory must be only created when using file backend.
Also ensure on each player save that the directory exists
2019-01-04 10:06:46 +01:00
sofar cf224c9d6b Remove remote media compatibility mode. (#8044)
The fallback code shouldn't be needed and is a remnant of the GET
method that old media servers use. Clients using it are likely
to just waste bandwidth and having to download the media again
through the normal transfer from server method. The most reliable
method is to get all missing textures therefore from the server
directly and not spam the remote media server with 404s.
2019-01-04 00:26:08 +01:00
SmallJoker bba4563d89 Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
2019-01-03 17:04:26 +01:00
Paramat ceacff13a6 CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000)
Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a
client was still able to add CSM code to 'builtin' to bypass that
restriction, because 'builtin' is not yet verified.

Until server-sent CSM and verifying of 'builtin' are complete, make
'LOAD_CLIENT_MODS' disable the loading of builtin.

Clarify code comments and messages to distinguish between client-side
modding and client-side scripting. 'Scripting' includes 'builtin',
'modding' does not.
2019-01-03 12:10:07 +01:00
HybridDog c6f784f43b Add minetest.load_area (#8023) 2018-12-31 00:32:54 +00:00
random-geek aa5ec2ec02 Extend pitch fly mode to swimming (#7943) 2018-12-31 00:07:30 +00:00
Loïc Blot a5197eaebc
CSM: add requested CSM_RF_READ_PLAYERINFO (#8007)
* CSM: add requested CSM_RF_READ_PLAYERINFO

This new CSM limit permit to limit PLAYERINFO read from server.

It affects get_player_names call
2018-12-24 10:51:10 +01:00
SmallJoker 67049eba3c Fix entity rotation in existing worlds (#7989) 2018-12-23 23:22:27 +00:00
Vitaliy 309e158fc8 mapnode: add const/noexcept (#8009) 2018-12-22 17:36:24 +01:00
rubenwardy 0990ddb3bb Android: Fix memory leak when displaying images in the mainmenu (#8011) 2018-12-22 08:46:41 +01:00
SmallJoker 2a69f874da reportMetadataChange; Silence clang warnings 2018-12-21 19:05:29 +01:00
stujones11 d994f7ca5f Fix more transparency issues with ogles2 driver (#8005) 2018-12-20 23:40:17 +01:00
stujones11 ba07a8b872 Android: Move touchscreen rare controls inline with settings icon (#8006) 2018-12-20 21:11:57 +00:00
Kevin Abrams b7eb81fed9 Add command line option to load password from file (#7832) 2018-12-18 20:15:14 +01:00
SmallJoker 80eb762af1 ieee_float: Silence compiler warning
Trivial issue reported by @pgimeno
2018-12-18 19:50:07 +01:00
Pedro Gimeno 8e4095f068 Fix the part of the float test that requires IEC559/IEEE754 compliance
GCC and CLang compilers fail to support full IEC559 compliance required for the test, when certain compiler flags are active. This patch implements a heuristic that checks for the most common flag in GCC and CLang, plues an extra check which GCC disables when it's not compliant, to hopefully catch most cases where it can't run.
2018-12-18 12:27:23 +01:00
Pedro Gimeno e7367f0fa5 Fix C++11 violation that broke clang on Debian Stretch 2018-12-16 20:08:25 +01:00
Loïc Blot eda35100b6
Add an activeobject manager to hold active objects (#7939)
* Add an activeobject manager to hold active objects
* Add unittests
2018-12-13 20:18:54 +01:00
SmallJoker 839e935ba0 Network: Send IEEE floats (#7768) 2018-12-13 11:20:57 +01:00
Wuzzy 8471d027b9 Make showOverlayMessage strings translatable (#7964) 2018-12-13 11:05:38 +01:00
Vitaliy 3bfb8284b8 Make MapNode handle paramtype2≠leveled properly (#7958) 2018-12-12 00:02:09 +01:00
Loïc Blot a8575295d5
porting.cpp: better minetest support on BSD
BSD folder detection is pretty raw, just use the same detection as Linux
2018-12-11 17:35:39 +01:00
rubenwardy f318366c20 Fix ContentDB packages timing out by using download_file instead (#7891) 2018-12-11 04:43:14 +00:00
Alex a833bee9ed Add object visual type 'item' (#7870) 2018-12-11 02:57:04 +00:00
Update Script 98a72b9d45 Update minetest.conf.example and run updatepo.sh (#7947) 2018-12-09 14:16:58 +01:00
Martin Renold b02effdab9 Fix crash if display resolution is not set (#7950)
On my wayland / gnome3 setup DisplayHeightMM() returns 0. This resulted in a
misleading startup error suggesting to fix my font paths.
2018-12-08 16:26:04 +01:00
Paramat f0dca284b3
Main menu style: Set to 'full' for Android, remove 'auto' option (#7936) 2018-12-06 23:52:11 +00:00
Paramat 08884d258b
Draw all horizons and sky base, in front of stars (#7932)
Move star draw to before sun glow texture draw and before sun draw,
not currently essential but the logical order. Will be necessary if
a 'no far ground' option is added, to draw stars behind the sun.
2018-12-06 03:56:35 +00:00
CoderForTheBetter 8cc75c053f Fix player rotations (#7941) 2018-12-05 09:28:09 +01:00
SmallJoker 3d66622772
Send only changed node metadata to clients instead of whole mapblock (#5268)
Includes newer style changes and fixes by est31

Improve the block position de-serialization
Add type NodeMetadataMap
2018-12-04 20:37:48 +01:00
Loïc Blot b362e04ebf Revert "Fix another GCC warning"
This reverts commit e6811184d5.
2018-12-04 16:45:07 +01:00
Loïc Blot 75a26b10ab Add testWrapDegrees_0_360_v3f unittests 2018-12-04 16:18:17 +01:00
Loïc Blot e6811184d5 Fix another GCC warning
```
[ 10%] Building CXX object src/CMakeFiles/minetest.dir/client/render/interlaced.cpp.o
cc1plus: warning: -Wabi won't warn about anything [-Wabi]
cc1plus: note: -Wabi warns about differences from the most up-to-date ABI, which is also used by default
cc1plus: note: use e.g. -Wabi=11 to warn about changes from GCC 7
```
2018-12-04 15:57:50 +01:00
Loïc Blot 7f545db977 Fix a stringop-truncation GCC warning
```
minetest/src/filesys.cpp:312:10: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 10000 equals destination size [-Wstringop-truncation]
   strncpy(argv_data[2], path.c_str(), 10000);
```
2018-12-04 12:39:19 +01:00
Loïc Blot 39ea1cd428 Fix uninitialized variable peer_id
Reported by GCC

```
minetest/src/server.cpp:996:42: warning: ‘peer_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   errorstream << "ProcessData: peer=" << peer_id << e.what() << std::endl;
```
2018-12-04 12:39:10 +01:00