Commit Graph

4460 Commits

Author SHA1 Message Date
Auke Kok 94358a709b Fix "error: ‘playerSAO’ was not declared"
Cause: 351cc2e79a

A rebase issue missed a rename from playerSAO to playersao.

Tested.
2017-04-06 22:05:31 -07:00
Ekdohibs a5c9174bad Fix spacing 2017-04-06 21:27:29 -07:00
Ekdohibs 08b680d588 Fix problems when overriding the hand:
- If the hand can dig a node the item wielded can't, allow to dig it anyway.
- Fix the API callbacks from setting the hand instead of the wielded item.
2017-04-06 21:27:29 -07:00
rubenwardy bce0d458d8 Add Joystick type detection and Xbox controller support
* Add joystick type detection (with joystick_type setting to override it)
* Fix multiple joysticks from interfering with each other by only reading from one (add joystick_id setting)
* Add support for Xbox controllers
2017-04-06 20:58:52 -07:00
presstabstart 351cc2e79a Fix multiple death messages (#5305)
Fix multiple death messages (#3565) and damage server logs after death.
2017-04-06 20:32:50 -07:00
orwell96 63e175dd70 Show media download progress in percent on progress screen (#5498) 2017-04-07 00:03:29 +02:00
Loïc Blot 3a90b78a03
LINT: Switch whitelist check from egrep to awk
Bonus: make CI happy with the last rules fix
2017-04-06 23:21:40 +02:00
red-001 88b9b9652a [CSM] Add function to get the server protocol version. (#5529) 2017-04-06 22:50:45 +02:00
Loïc Blot be06636965 Clang-format continuation indent fixes + .gitignore additions
* Proper support for continuation indents in clang format
* make src/wieldmesh.h proper and remove it from whitelist
* Add CLion default build directories in .gitignore
2017-04-06 15:37:02 +02:00
Loic Blot 4b15f76ed1
Move LINT process in dedicated shell & fix
Move lint to dedicated shell permit to use it from your shell easily to check what is wrong
Also fix recent regressions in code style
2017-04-06 09:10:59 +02:00
red-001 4ee6be856d [CSM] Add support for positional audio. (#5516)
Fixes parts of #5389.
2017-04-06 08:14:31 +02:00
Loïc Blot 54ffc4e915 Memleak fix: LocalPlayer object was not deleted
Delete LocalPlayer when ClientEnvironment (object owner) is destroyed
2017-04-05 12:30:52 +02:00
paramat 1eca9ecf7d Mapgen: Remove '#include treegen.h' from non-mgv6 mapgens
Only mgv6 uses the tree functions from treegen.cpp.
2017-04-05 07:30:00 +01:00
Paramat b8a4c95971 MapgenBasic: Add lava source as commonly used content (#5512)
Future mapgens are likely to use this for magma and volcanos.
Remove the getting of lava source content id in mgvalleys.
2017-04-04 07:51:58 +02:00
Loïc Blot 563199698d Client handlers: Remove useless stringstream usage in two handlers (#5510) 2017-04-04 07:47:04 +02:00
red-001 000ec26001 [CSM] Add local node meta reference. (#5508) 2017-04-04 07:41:37 +02:00
paramat 859141a0ce Cavegen/Mgv5/Mgv7: Add optional giant caverns
Add to MapgenBasic for use by multiple mapgens.
Add to mgv5 and mgv7, enabled by default.

Similar to mgvalleys caverns but half the scale.
Parameters for upper y limit, distance caverns taper to full size, and
noise threshold (full cavern size).
As with mgvalleys caverns are generated first and classic caves are
disabled in any mapchunk containing a cavern, to avoid excessive
spreading volumes of liquids.
This also avoids floating blobs of liquid where a large classic cave
has overgenerated out into a neighbouring previously-generated mapchunk.
2017-04-03 04:49:32 +01:00
Loïc Blot 86b1542181 Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ instead of src/ (#5473)
* Update embedded jsoncpp from unk version to 0.10.6

0.10.6 is last release without c++11

* Make jsoncpp more compliant with its amalgamate

Jsoncpp cpp file should be upper, make the library like it does in amalgamate

* Reorganization: move minetest embedded libs outside of source tree to /lib

* Fix a dead grep in LINT
2017-04-02 10:51:50 +02:00
Loïc Blot 987eb2b761 Clang-format: trivial fix on some headers (#5495)
Fix some headers style and remove them from whitelist
2017-04-01 14:48:16 +02:00
red-001 63ac62ec8a [CSM] Add function and chat command to disconnect from server. (#5487) 2017-04-01 13:40:56 +02:00
number Zero 813a9a36b2 Signlike, glasslike drawtypes: Fix inverted textures 2017-04-01 10:08:28 +01:00
SmallJoker 773efc19b1 mapgen: Fix segfault when selecting invalid mapgen (#5491) 2017-04-01 10:18:13 +02:00
Loic Blot a4874270f7
Fix clang-format Columns Width
Also fix l_client.cpp/h and remove them from whitelist
2017-03-31 22:29:34 +02:00
kilbith 529ba8002d
Wieldmesh: Natural orientation depending on pitch (#5490) 2017-03-31 22:00:05 +02:00
adrido cc1ff26c3f Windows: Set window icon (#5486) 2017-03-30 20:28:37 +02:00
paramat ea549bbae3 Paramtype2: Add missing type CPT2_GLASSLIKE_LIQUID_LEVEL
Add the missing paramtype2 for param2 controlling the liquid level
inside the glasslike_framed drawtype.
Add missing documentation of the feature to lua_api.txt.
Update and improve comments for drawtype enumerations in nodedef.h.
2017-03-30 04:52:54 +01:00
Loïc Blot fbc1432fe8 l_minimap: don't show minimap if configuration doesn't allow it 2017-03-29 15:50:22 +02:00
Loïc Blot b605b95749 Add CPP11 header to define nullptr & constexpr (#5471)
This header permit to use nullptr & constexpr keywords in portable code segments and benefit from nullptr & constexpr when using C++11 and greater
2017-03-29 13:34:57 +02:00
sfan5 5e806690fc Sneak: Fix sneaking on free-floating lower-half slabs 2017-03-29 10:19:49 +02:00
sfan5 b85301ce69 Sneak: Fix stair lower step bug and ladder in 1x1 hole bugs 2017-03-29 00:51:13 +01:00
Loïc Blot a9878a0da5 PostgreSQL: fix delete block
Typo fix: we are doing select on delete block.

This fix issue #5426
2017-03-27 15:03:13 +02:00
paramat ec0c4d33db Map generation limit: Make per-world
The setting limits map generation but affects nothing else.
Add 'mapgen_limit' to global mapgen parameters.
Move 'blockpos_over_mapgen_limit()' to the only place it is called
from: map.cpp.
Allow teleportation to any part of the world even if over the set
mapgen limit.
Simplify the reading of this limit in mgvalleys.
Remove the 'map_generation_limit' setting.
2017-03-27 03:18:09 +01:00
Diego Martínez 09f2cd0264 Pathfinder: Send errors to `warningstream`.
Avoids spamming the chat about several errors.
2017-03-27 03:17:37 +01:00
Loic Blot 53d1b3d924
Fix mismatch struct/class for GameUIFlags 2017-03-26 18:54:39 +02:00
sfan5 1139a18c3a Sneak: Replicate sneak ladder in new code, is optional
Enabled using the existing 'sneak_glitch' physics override.
2017-03-26 05:53:30 +01:00
red-001 e70e15134c Change command prefix to "." and add "help" command. 2017-03-26 05:51:14 +01:00
number Zero 4d5177ff70 Add mesh generation delay 2017-03-26 05:50:59 +01:00
Loïc Blot 22567d107f Add clang format & skip build if no source file modified (#5433)
* [BUILD] Add clang format + build skipping

* Add clang-format tool to check codestyle.
Warning: it check the whole modified file, not the diff part, it's why it's lazy. Please also look if rules are perfect, i take the Linux codestyle from LLVM site

Fix issue #5415

* Skip building project if no file is modified
* Fix a wrong brace to trigger LINT

* Make lint step outside of unix build scope

* Add AccessModifierOffset: -8

* Typo fix & needs compile fix

* Fix header priorities
2017-03-25 19:12:18 +01:00
SmallJoker 5a59ad2307 Tile.cpp: Fix MSVC build broken by 072bbba 2017-03-24 20:05:15 +01:00
Loïc Blot 072bbba69a Some performance optimizations (#5424)
* Some performance optimizations

This is globally removing some memory useless copy

* use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it
 * pass some stack created strings to static const as they are not modified anywhere
 * Camera: return nametags per const ref instead of a list pointer, we only need to read it
 * INodeDefManager: getAll should be a result ref writer instead of a return copy
 * INodeDefManager: getAlias should return a const std::string ref
 * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop)
 * CNodeDefManager::updateAliases: prevent a idef getall copy
 * Profiler: constness
 * rollback_interface: create real_name later, and use const ref
 * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction,
 * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec
 * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
2017-03-22 21:41:02 +01:00
bigfoot547 9efc5da0fb [CSM] Add function to get player names in range (#5435)
* [CSM] Add function to get currently connected player names
2017-03-22 21:13:03 +01:00
number Zero d4e0c0f9b8 Content_mapblock.cpp: Refactor 2017-03-20 20:28:22 +00:00
Ben Deutsch e7246d3f0d Refactored client event if-else cascade to switch statement 2017-03-20 18:35:33 +00:00
paramat d3131aeae7 Map generation limit: Rewrite
The previous implementation applied the setting to blockpos_over_limit(),
objectpos_over_limit() and in createSector(), causing many bugs near the
world edge.

First revert the previous implementation.
Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity.
Add a new function to mapblock.h called blockpos_over_mapgen_limit() that
checks against the map_generation_limit setting, and call this only from
the code that decides where mapgen stops.
Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the
chance of bugs, there is no need to use map_generation_limit here.
2017-03-20 18:34:18 +00:00
sfan5 525d2a0d51 Fix /shutdown or ^C no longer causing server exit
Broken since b8484ef24e
2017-03-19 18:21:18 +01:00
Loïc Blot 3c4ac70348 Refactor Game class (part 2) (#5422)
* showPauseMenu is now part of game
* remove many flags parameters passed to game functions, use the member.
* rename VolatileRunFlags to GameUIFlags (this will permit to share structure with client and CSM
* updatePointedThing: remove pointer ref, we already have the pointer in rundata
* move some attributes outside of VolatileRunFlags after renaming, to game class
* rename statustext to m_statustext
* make some const variables static
* All those changes permit to reduce a little bit function class cost and will permit to interface CSM with some interesting Game flags
* Expose GameUIFlags to client
* Client now have GameUIFlags parameter and setters for other classes
* Fix minimap show/hide in Lua because we now have access to the real flag
2017-03-19 13:18:52 +01:00
red-001 2e3778ec0c Block access to the `io` library 2017-03-19 12:34:33 +01:00
Loïc Blot f8ad01ab7c Update server min protocol version to v24 (#5411)
* Update server min protocol version to v24

It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt

v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14

* Drop protocol v23 and lesser code
2017-03-19 08:44:29 +01:00
ShadowNinja b8484ef24e Server list cleanup
This removes the hacky server_dedicated pseudo-setting.
2017-03-18 12:37:57 +01:00
Wuzzy 2cc518dcaf Show itemstring as tooltip if no item description 2017-03-18 12:36:28 +01:00