oweals/minetest.git
7 years agoMgv6: Add fallback node for gravel
paramat [Sat, 4 Feb 2017 06:03:04 +0000 (06:03 +0000)]
Mgv6: Add fallback node for gravel

Gravel now falls back to stone.
Gravel is not a particularly fundamental node, allowing it to fall back
to stone frees up subgames from having to include a gravel node.
Non-blob-ore gravel is only present in mgv6 as extremely rare 'gravel
biomes'.

7 years agoMgv6: Add stairs to desert stone dungeons
paramat [Sat, 4 Feb 2017 04:28:02 +0000 (04:28 +0000)]
Mgv6: Add stairs to desert stone dungeons

As with the other mapgens, now that wide stairs in dungeons are
possible we can now finally add stairs to desert stone dungeons.
Re-order some lines.

7 years agoMapgenBasic node resolver: Various fixes
paramat [Sat, 4 Feb 2017 04:04:03 +0000 (04:04 +0000)]
MapgenBasic node resolver: Various fixes

Add a fallback node for stair_desert_stone to avoid ignore placed
in Minimal subgame desert dungeons.
Don't allow river_water_source to fallback to water_source as river
water needs to be non-renewable and have a short flow range.
Make stair_sandstonebrick fall back to sandstonebrick instead of
sandstone.

Re-order some lines.
Add a comment.

7 years agoServerlist: Add ping indicators (#5164)
kilbith [Fri, 3 Feb 2017 13:53:43 +0000 (14:53 +0100)]
Serverlist: Add ping indicators (#5164)

7 years agoTell on_punch to expect a return value
Duane Robertson [Tue, 31 Jan 2017 04:37:04 +0000 (22:37 -0600)]
Tell on_punch to expect a return value

The return value should be interpreted as a boolean saying whether
the lua on_punch function handled damage or the system needs to.

7 years agoMgvalleys: Fix missing decorations and incorrect function order
paramat [Mon, 30 Jan 2017 18:06:17 +0000 (18:06 +0000)]
Mgvalleys: Fix missing decorations and incorrect function order

Fix missing decorations at horizontal chunk borders by adding
'updateHeightmap()' after terrain generation.

Swap order of 'calculateNoise' and 'calcBiomeNoise' because
'calculateNoise' modifies the heat and humidity maps created in
'calcBiomeNoise'.

Remove confusing comment, code block is not just for mods and
seems essential for correct mapgen behaviour.

7 years agoFix anticheat resetting client position after the client is teleported
Ekdohibs [Mon, 30 Jan 2017 06:58:43 +0000 (07:58 +0100)]
Fix anticheat resetting client position after the client is teleported

Previously, m_move_pool could accomodate the client moving from the new
position to the old one, and the server accepted the client to go back
to its old position. However, it couldn't then accomodate the client
moving from its old to its new position, and therefore would reset position
to the old position. Thus, by emptying m_move_pool after a teleport, the
server no longer accepts the client to go back to its old position. A
drawback is however that a laggy client *will* trigger a few
"moved_too_fast" anticheats before being told about its new position.

Don't report player cheated if caused by lag.

Fixes #5118

7 years agoMake facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. (#5153)
Nathanaël Courant [Tue, 31 Jan 2017 23:02:30 +0000 (00:02 +0100)]
Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. (#5153)

7 years agoFix fog weirdness (#5146)
numberZero [Tue, 31 Jan 2017 07:42:39 +0000 (11:42 +0400)]
Fix fog weirdness (#5146)

7 years agoPlantlike visual scale: Send sqrt(visual_scale) to old clients
paramat [Sun, 29 Jan 2017 06:29:40 +0000 (06:29 +0000)]
Plantlike visual scale: Send sqrt(visual_scale) to old clients

Keep compatibility with protocol < 30 clients now that visual_scale
is no longer applied twice to plantlike drawtype and mods are being
updated to a new value.

7 years agoAdd multiply texture modifier
sapier [Sat, 14 Jan 2017 22:16:58 +0000 (23:16 +0100)]
Add multiply texture modifier

Allows colorizing of textures using a color multiplication method.

7 years agoUse fabs() instead of abs() (#5141)
Dániel Juhász [Mon, 30 Jan 2017 07:18:18 +0000 (08:18 +0100)]
Use fabs() instead of abs() (#5141)

7 years agoRe-add halo highlight (#5130)
Dániel Juhász [Mon, 30 Jan 2017 01:47:36 +0000 (02:47 +0100)]
Re-add halo highlight (#5130)

Due to a rebase mistake halo highlighting was disabled. This commit
re-adds that feature.

7 years agoAdd console height setting (#5136)
Ezhh [Sun, 29 Jan 2017 16:10:17 +0000 (16:10 +0000)]
Add console height setting (#5136)

7 years agoRename height to scale for openConsole() (#5139)
Zeno- [Sun, 29 Jan 2017 09:26:00 +0000 (19:26 +1000)]
Rename height to scale for openConsole() (#5139)

For Game::openConsole() and GUIChatConsole::openConsole() the
parameter name 'height' is misleading because it's actually a
percentage of the screen/window height.

7 years agoFix AIX threading build 5134/head
ShadowNinja [Sat, 28 Jan 2017 22:23:30 +0000 (17:23 -0500)]
Fix AIX threading build

7 years agoFix synchronization issue at thread start
ShadowNinja [Sat, 28 Jan 2017 22:02:43 +0000 (17:02 -0500)]
Fix synchronization issue at thread start

If a newly spawned thread called getThreadId or getThreadHandle before
the spawning thread finished saving the thread handle, then the
handle/id would be used uninitialized.  This would cause the threading
tests to fail since isCurrentThread would return false, and if Minetest
is built with C++11 support the std::thread object pointer would be
dereferenced while ininitialized, causing a segmentation fault.

This fixes the issue by using a mutex to force the spawned thread to
wait for the spawning thread to finish initializing the thread object.

An alternative way to handle this would be to also set the thread
handle/id in the started thread but this wouldn't work for C++11
builds because there's no way to get the partially constructed object.

7 years agofrom_table: Fix crash for missing inventory or field
SmallJoker [Mon, 2 Jan 2017 14:17:28 +0000 (15:17 +0100)]
from_table: Fix crash for missing inventory or field

7 years agoMake entity on_punch have same signature and behaviour as player on_punch
sapier [Sat, 21 Jan 2017 14:58:07 +0000 (15:58 +0100)]
Make entity on_punch have same signature and behaviour as player on_punch

7 years agoPlantlike: Fix visual_scale being applied squared (#5115)
Paramat [Sat, 28 Jan 2017 10:07:35 +0000 (10:07 +0000)]
Plantlike: Fix visual_scale being applied squared (#5115)

Visual_scale was applied twice to plantlike by accident sometime between
2011 and 2013, squaring the requested scale value. Visual_scale is
correctly applied once in it's other uses in signlike and torchlike.

Two lines of code are removed, they also had no effect for the vast
majority of nodes with the default visual_scale of 1.0.
The texture continues to have it's base at ground level.

7 years agoImplement player attribute backend (#4155)
Loïc Blot [Fri, 27 Jan 2017 07:59:30 +0000 (08:59 +0100)]
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).

7 years agoDungeongen: Fix selection of diagonal corridors
paramat [Thu, 26 Jan 2017 15:38:18 +0000 (15:38 +0000)]
Dungeongen: Fix selection of diagonal corridors

The do .. while loop is waiting for both dir.X and dir.Z to be non-zero,
so should continue to loop if either dir.X or dir.Z are zero. The brackets
present suggest this was intended to be OR not AND.

7 years agoDungeons: Add nodebox stairs to desert and sandstone dungeons
paramat [Mon, 23 Jan 2017 08:07:34 +0000 (08:07 +0000)]
Dungeons: Add nodebox stairs to desert and sandstone dungeons

Desert and sandstone dungeons have 2 node wide corridors. Previously,
nodebox stairs were disabled because dungeon generation code did not
support nodebox stairs wider than 1 node, now it does.

Add 'stair desert stone' content id to MappgenBasic.

Requires 'mapgen stair desert stone' to be added to Minetest Game.

7 years agoFix after hardware node coloring (#5114)
Dániel Juhász [Thu, 26 Jan 2017 15:10:56 +0000 (16:10 +0100)]
Fix after hardware node coloring (#5114)

7 years agoDungeongen: Fix out-of-voxelmanip access segfault
paramat [Wed, 25 Jan 2017 15:23:29 +0000 (15:23 +0000)]
Dungeongen: Fix out-of-voxelmanip access segfault

My recent dungeon commit allowed stairs to be placed across the full
width of corridors, but some of the new node positions accessed were
missing checks for being within the voxelmanip, causing occasional
segfaults near dungeons with corridors wider than 1 node.

Add 'vm->m_area.contains(pos)' checks just before stair position
voxelmanip access. This allows an earlier check to be removed as it
is now redundant.

7 years agoBlock spam messages before calling on_chatmessage callbacks (#4805) 5070/head
rubenwardy [Wed, 25 Jan 2017 09:57:33 +0000 (09:57 +0000)]
Block spam messages before calling on_chatmessage callbacks (#4805)

Fixes #4799

7 years agoAdd smooth lighting for all nodes
number Zero [Tue, 24 Jan 2017 21:33:01 +0000 (00:33 +0300)]
Add smooth lighting for all nodes

Note: Smooth lighting disables the mesh cache.

7 years agoWrap to positive degree values (#5106)
raymoo [Tue, 24 Jan 2017 16:25:11 +0000 (08:25 -0800)]
Wrap to positive degree values (#5106)

7 years agoInitialize TileAnimationParams to prevent crashes/bugs for legacy invocations of...
sfan5 [Tue, 24 Jan 2017 14:19:29 +0000 (15:19 +0100)]
Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of add_particle{,spawner} (fixes #5108)

7 years agoZoom FOV: Reduce minimum zoom FOV to 7 degrees
paramat [Sun, 22 Jan 2017 04:21:29 +0000 (04:21 +0000)]
Zoom FOV: Reduce minimum zoom FOV to 7 degrees

The default of 15 is unchanged.
7 degrees is x10 magnification which is common for binoculars.
Alter hardcoded limits in camera.cpp:
Minimum 7 degrees.
Maximum 160 degrees to match upper limits in advanced settings.

7 years agoDungeons: Support nodebox stairs wider than 1 node
paramat [Sat, 21 Jan 2017 06:30:33 +0000 (06:30 +0000)]
Dungeons: Support nodebox stairs wider than 1 node

Previously, code did not support stair nodeboxes in corridors wider
than 1 node.
Make stair nodeboxes full width even in corridors with different
widths in X and Z directions.

7 years agocore: Add dir_to_yaw and yaw_to_dir helpers
Auke Kok [Thu, 12 Jan 2017 19:56:41 +0000 (11:56 -0800)]
core: Add dir_to_yaw and yaw_to_dir helpers

These are needed to go from things like entity yaw to a vector
and vice versa.

7 years agoVector: Add vector.sort(a, b): return box edges
Auke Kok [Thu, 12 Jan 2017 19:27:39 +0000 (11:27 -0800)]
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.

7 years agoAdd hardware node coloring. Includes:
Dániel Juhász [Thu, 12 Jan 2017 14:46:30 +0000 (15:46 +0100)]
Add hardware node coloring. Includes:
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"

7 years agoFix potential crash in chat handling (since 2f56a00d9eef82052614e5854a07b39b087efd0b)
sfan5 [Sun, 22 Jan 2017 19:17:13 +0000 (20:17 +0100)]
Fix potential crash in chat handling (since 2f56a00d9eef82052614e5854a07b39b087efd0b)

7 years agoRemove os.exit from the Lua secure sandbox (#5090)
Loïc Blot [Sat, 21 Jan 2017 21:05:54 +0000 (22:05 +0100)]
Remove os.exit from the Lua secure sandbox (#5090)

os.exit will exit not using proper resource liberation paths.

Mods should call the proper exit mod using our API

7 years agoAdd show_statusline_on_connect setting (#5084)
Loïc Blot [Sat, 21 Jan 2017 18:30:42 +0000 (19:30 +0100)]
Add show_statusline_on_connect setting (#5084)

Add show_statusline_on_connect setting

7 years agoRevert "Detach the player from entities on death." (#5087)
Loïc Blot [Sat, 21 Jan 2017 16:30:55 +0000 (17:30 +0100)]
Revert "Detach the player from entities on death." (#5087)

7 years agoFix unknown command message not providing number of cmd
sapier [Sat, 21 Jan 2017 16:11:06 +0000 (17:11 +0100)]
Fix unknown command message not providing number of cmd

7 years agoAdd Entity get_texture_mod() to Lua API
sapier [Sat, 14 Jan 2017 18:32:10 +0000 (19:32 +0100)]
Add Entity get_texture_mod() to Lua API
Send texture modifier to clients connecting later too

7 years agoDetach the player from entities on death. (#5077)
red-001 [Sat, 21 Jan 2017 15:11:55 +0000 (15:11 +0000)]
Detach the player from entities on death. (#5077)

7 years agoWarning fix for 2ea60156437962d7d29d20606bf5d9189059f76b (#5082)
Loïc Blot [Sat, 21 Jan 2017 10:29:18 +0000 (11:29 +0100)]
Warning fix for 2ea60156437962d7d29d20606bf5d9189059f76b (#5082)

Neither flag as force delete nor show the warning when mapblock is full and object is a player

7 years agoDo not force deletion of players when mapblock is full (#5081)
Loïc Blot [Sat, 21 Jan 2017 09:41:00 +0000 (10:41 +0100)]
Do not force deletion of players when mapblock is full (#5081)

This fixes #4067

7 years agoRemove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)
red-001 [Fri, 20 Jan 2017 22:19:41 +0000 (22:19 +0000)]
Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)

7 years agoAdd chatcommand unregister and override API (#5076)
Elijah Duffy [Fri, 20 Jan 2017 18:49:20 +0000 (10:49 -0800)]
Add chatcommand unregister and override API (#5076)

Introduces two functions to unregister and override chatcommands.
minetest.unregister_chatcommand("<name>") and
minetest.override_chatcommand("<name>", {<redifinition>})

7 years agoFix MSVC build Build broken by 98e36d7
SmallJoker [Wed, 18 Jan 2017 20:03:15 +0000 (21:03 +0100)]
Fix MSVC build Build broken by 98e36d7

7 years agoAdd particle animation, glow
sfan5 [Sat, 14 Jan 2017 15:48:49 +0000 (16:48 +0100)]
Add particle animation, glow

This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.

7 years agoAdd minetest.player_exists() (#5064)
rubenwardy [Wed, 18 Jan 2017 10:19:57 +0000 (10:19 +0000)]
Add minetest.player_exists() (#5064)

7 years agoAdd search to advanced settings (#4806)
rubenwardy [Wed, 18 Jan 2017 06:48:25 +0000 (06:48 +0000)]
Add search to advanced settings (#4806)

* Add search to advanced settings

* Press enter again to go to next result

* Use keyword based search, auto select best option

7 years agoFix typo in alias for deprecated settexturemod
sapier [Tue, 17 Jan 2017 18:41:52 +0000 (19:41 +0100)]
Fix typo in alias for deprecated settexturemod

7 years agoImprove priv descriptions (#5047)
Ezhh [Tue, 17 Jan 2017 14:41:25 +0000 (14:41 +0000)]
Improve priv descriptions (#5047)

7 years agoRemove client-side chat prediction. (#5055)
red-001 [Mon, 16 Jan 2017 23:09:47 +0000 (23:09 +0000)]
Remove client-side chat prediction. (#5055)

Network lag isn't really a big issue with chat and chat prediction makes writing mods harder.

7 years agoAdjust formspec spacing on the Client tab of the mainmenu 5053/head
rubenwardy [Mon, 16 Jan 2017 15:15:43 +0000 (15:15 +0000)]
Adjust formspec spacing on the Client tab of the mainmenu

7 years agoRename ObjectRef methods to be consistent and predictable 5052/head
rubenwardy [Mon, 16 Jan 2017 13:08:59 +0000 (13:08 +0000)]
Rename ObjectRef methods to be consistent and predictable

7 years agoAdd keyword based search to serverlist
red-001 [Fri, 6 Jan 2017 20:29:29 +0000 (20:29 +0000)]
Add keyword based search to serverlist

7 years agoAdded lua tracebacks to some errors where you have been blind to what… (#5043)
sapier [Sun, 15 Jan 2017 12:36:53 +0000 (13:36 +0100)]
Added lua tracebacks to some errors where you have been blind to what… (#5043)

* Added lua tracebacks to some errors where you have been blind to what actually went wrong

7 years agoDocumentation: Correct biome heat / humidity noise parameters
paramat [Sun, 15 Jan 2017 01:21:36 +0000 (01:21 +0000)]
Documentation: Correct biome heat / humidity noise parameters

When the new set of biomes was added in MTGame the 'spread' for heat
and humidity noise parameters was increased to 1000, i forgot to update
settingtypes.txt and minetest.conf.

7 years agoAdd color names from web page referenced in luaapi doc
sapier [Sat, 14 Jan 2017 21:30:03 +0000 (22:30 +0100)]
Add color names from web page referenced in luaapi doc

7 years agoOnly set material flag on rendered meshes (#5023)
lhofhansl [Sat, 14 Jan 2017 21:30:14 +0000 (13:30 -0800)]
Only set material flag on rendered meshes (#5023)

7 years agoFix build with freetype support disabled
sfan5 [Sat, 14 Jan 2017 11:28:43 +0000 (12:28 +0100)]
Fix build with freetype support disabled

7 years agoFix another missing const reported by clang & @sfan5
Loic Blot [Sat, 14 Jan 2017 11:20:59 +0000 (12:20 +0100)]
Fix another missing const reported by clang & @sfan5

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
7 years agoFix missing const in ServerActiveObject::getStaticData
Loic Blot [Sat, 14 Jan 2017 11:03:50 +0000 (12:03 +0100)]
Fix missing const in ServerActiveObject::getStaticData

This fixes #5033

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
7 years agoOrganize defaultsettings.cpp 5030/head
ShadowNinja [Thu, 15 Oct 2015 17:16:26 +0000 (13:16 -0400)]
Organize defaultsettings.cpp

7 years agoMain menu tweaks
ShadowNinja [Thu, 15 Oct 2015 17:05:33 +0000 (13:05 -0400)]
Main menu tweaks

7 years agoOptimize SAO getStaticData by using std::string pointer instead of return copy
Loic Blot [Wed, 11 Jan 2017 21:48:14 +0000 (22:48 +0100)]
Optimize SAO getStaticData by using std::string pointer instead of return copy

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
7 years agoCleanup content_sao by factorizing similar code parts
Rogier [Wed, 11 Jan 2017 19:25:25 +0000 (04:25 +0900)]
Cleanup content_sao by factorizing similar code parts

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
7 years agoEnable mod security by default
ShadowNinja [Sun, 9 Oct 2016 18:36:22 +0000 (14:36 -0400)]
Enable mod security by default

7 years agoMeshes: Make object mesh face shading consistent
paramat [Sat, 24 Dec 2016 06:40:57 +0000 (06:40 +0000)]
Meshes: Make object mesh face shading consistent

Previously, object meshes had their North and South faces darker than
East and West faces, the opposite of nodes and meshnodes. This commit
corrects this.
State constants as float-literals not double-literals.
Simplify code.
Add comment.

7 years agoMake nametag removable with set_nametag_attributes (#5021)
Rui [Wed, 11 Jan 2017 19:25:25 +0000 (04:25 +0900)]
Make nametag removable with set_nametag_attributes (#5021)

7 years agoCleanup some header inclusions to improve compilation times
Loic Blot [Wed, 11 Jan 2017 08:03:07 +0000 (09:03 +0100)]
Cleanup some header inclusions to improve compilation times

7 years agoPerformance fix + SAO factorization
Rogier [Mon, 9 Jan 2017 19:39:45 +0000 (04:39 +0900)]
Performance fix + SAO factorization

Original credits goes to @Rogier-5

* Merge common attributes between LuaEntitySAO & PlayerSAO to UnitSAO
* Make some functions const
* Improve some lists performance by returning const ref

Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
7 years agoAdd staticdata parameter to add_entity (#5009)
Rui [Mon, 9 Jan 2017 19:39:45 +0000 (04:39 +0900)]
Add staticdata parameter to add_entity (#5009)

* Add staticdata parameter to add_entity
* Add add_entity_with_staticdata to core.features

7 years agoEnvironment & IGameDef code refactoring (#4985)
Ner'zhul [Mon, 9 Jan 2017 19:39:22 +0000 (20:39 +0100)]
Environment & IGameDef code refactoring (#4985)

* Environment code refactoring
* Cleanup includes & class declarations in client & server environment to improve build speed
* ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts.
* Cleanup IGameDef
  * Move ITextureSource* IGameDef::getTextureSource() to Client only.
  * Also move ITextureSource *IGameDef::tsrc() helper
  * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call
  * drop unused emerge() call
  * cleanup server unused functions (mentionned before)
* Drop one unused parameter from ContentFeatures::updateTextures
* move checkLocalPrivilege to Client
* Remove some unnecessary casts
* create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it
* Fix some comments
* Change required IGameDef to Server/Client pointers
* Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects
* Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu
* drop ClientMap::sectorWasDrawn which is unused

7 years agosupport older PostGreSQL versions (#4999)
zeuner [Mon, 9 Jan 2017 16:03:13 +0000 (17:03 +0100)]
support older PostGreSQL versions (#4999)

* support older PostGreSQL versions
* documentation accuracy

* improve performance by affecting less rows in UPDATE queries

7 years agobuiltin/.../falling.lua: Avoid crash when hitting unknown nodes
sfan5 [Mon, 9 Jan 2017 15:39:40 +0000 (16:39 +0100)]
builtin/.../falling.lua: Avoid crash when hitting unknown nodes

7 years agoMap generation limit: Cache as 'const' not 'const static'
paramat [Sat, 7 Jan 2017 21:24:31 +0000 (21:24 +0000)]
Map generation limit: Cache as 'const' not 'const static'

7 years agoMap generation limit: Fix checks for block/sector over-limit
paramat [Tue, 27 Dec 2016 17:00:47 +0000 (17:00 +0000)]
Map generation limit: Fix checks for block/sector over-limit

Fix the maths that check if any part of a mapblock or sector is over the
set map_generation_limit.
Therefore avoid the loading of any over-limit blocks that were previously
generated when map_generation_limit was larger. The set limit can vary
for a world because it is not yet a per-world mapgen parameter, even when
it is sometimes it will be changed deliberately.
Therefore avoid a player being returned to world centre if they re-enter
a world while being over-limit.

Fix the createSector() crash caused by a mob spawning over-limit in an
over-limit mapblock

7 years agoMinor: Fix indentation in serverenvironment.cpp
Lars Hofhansl [Sun, 8 Jan 2017 17:32:16 +0000 (09:32 -0800)]
Minor: Fix indentation in serverenvironment.cpp

7 years agoMove ServerEnvironment to dedicated cpp/header files
Loic Blot [Sun, 8 Jan 2017 10:01:35 +0000 (11:01 +0100)]
Move ServerEnvironment to dedicated cpp/header files

* also cleanup some unneeded inclusions

7 years agoMove ClientEnvironment to dedicated cpp/header files
Loic Blot [Sun, 8 Jan 2017 09:49:47 +0000 (10:49 +0100)]
Move ClientEnvironment to dedicated cpp/header files

7 years agoGet neighbor from same map block if possible in ABMHandler (#4998)
lhofhansl [Sun, 8 Jan 2017 07:42:25 +0000 (23:42 -0800)]
Get neighbor from same map block if possible in ABMHandler (#4998)

7 years agoMake column alignment consistent in advanced settings (#5004)
Ezhh [Sat, 7 Jan 2017 11:33:38 +0000 (11:33 +0000)]
Make column alignment consistent in advanced settings (#5004)

7 years agoRevert "Extend minetest.is_yes()"
sfan5 [Sat, 7 Jan 2017 10:05:05 +0000 (11:05 +0100)]
Revert "Extend minetest.is_yes()"

This reverts commit c435eabf3ffb77eab955d5faeb5450da1befc149.

7 years agoExtend minetest.is_yes()
red-001 [Sat, 3 Dec 2016 11:38:07 +0000 (11:38 +0000)]
Extend minetest.is_yes()

7 years agoREADME.txt: Update the License to 2010-2017
LNJ [Thu, 5 Jan 2017 20:28:58 +0000 (21:28 +0100)]
README.txt: Update the License to 2010-2017

7 years agolua_api.txt: Add registered_chatcommands to global tables
LNJ [Thu, 5 Jan 2017 21:38:43 +0000 (22:38 +0100)]
lua_api.txt: Add registered_chatcommands to global tables

7 years agoAdd raycast.cpp and tileanimation.cpp to Android.mk
Wayward1 [Thu, 5 Jan 2017 00:44:11 +0000 (19:44 -0500)]
Add raycast.cpp and tileanimation.cpp to Android.mk

7 years agoExpose and document chatcommands as minetest.registered_chatcommands 4987/head
rubenwardy [Wed, 28 Dec 2016 13:01:32 +0000 (13:01 +0000)]
Expose and document chatcommands as minetest.registered_chatcommands

7 years agoFixes for using std:vector in ABMHander and further perf improvements
Lars Hofhansl [Wed, 4 Jan 2017 19:11:55 +0000 (11:11 -0800)]
Fixes for using std:vector in ABMHander and further perf improvements

7 years agoUse std::vector instead of std::map in class ABMHandler
Rogier-5 [Wed, 4 Jan 2017 05:23:22 +0000 (21:23 -0800)]
Use std::vector instead of std::map in class ABMHandler

7 years agoImprove getPointedThing() (#4346)
Dániel Juhász [Wed, 4 Jan 2017 18:18:40 +0000 (19:18 +0100)]
Improve getPointedThing() (#4346)

* Improved getPointedThing()

The new algorithm checks every node exactly once.
Now the point and normal vector of the collision is also returned in the
PointedThing (currently they are not used outside of the function).
Now the CNodeDefManager keeps the union of all possible nodeboxes, so
the raycast won't miss any nodes. Also if there are only small
nodeboxes, getPointedThing() is exceptionally fast.
Also adds unit test for VoxelLineIterator.

* Cleanup, code move

This commit moves getPointedThing() and
Client::getSelectedActiveObject() to ClientEnvironment.
The map nodes now can decide which neighbors they are connecting to
(MapNode::getNeighbors()).

7 years agoTravis: Build server too for UNIX
Loïc Blot [Wed, 4 Jan 2017 13:36:51 +0000 (14:36 +0100)]
Travis: Build server too for UNIX

7 years agoPull occlusion check out of loop, and minor code cleanups.
Lars Hofhansl [Sat, 31 Dec 2016 20:40:31 +0000 (12:40 -0800)]
Pull occlusion check out of loop, and minor code cleanups.

7 years agoFix display gamma documentation
Thomas--S [Mon, 2 Jan 2017 21:42:50 +0000 (22:42 +0100)]
Fix display gamma documentation

Overlooked in #4873

7 years agoAdd 2D sheet animation for nodes
sfan5 [Fri, 23 Dec 2016 13:43:56 +0000 (14:43 +0100)]
Add 2D sheet animation for nodes

7 years agoAdded "[sheet" to the texture special commands.
Luke Puchner-Hardman [Tue, 23 Sep 2014 12:39:34 +0000 (14:39 +0200)]
Added "[sheet" to the texture special commands.

"[sheet:WxH:X,Y" assumes the base image is a tilesheet with W*H tiles
on it and crops to the tile at position X,Y.  Basically it works
like "[verticalframe" but in 2D.

For testing, I combined the four default_chest images into one.

7 years agoMove TileAnimation code to seperate file
sfan5 [Fri, 23 Dec 2016 12:48:32 +0000 (13:48 +0100)]
Move TileAnimation code to seperate file

7 years agoFix non reverted change on TOSERVER_BREATH compat
Loic Blot [Sun, 1 Jan 2017 22:57:37 +0000 (23:57 +0100)]
Fix non reverted change on TOSERVER_BREATH compat

7 years agoBreath cheat fix: server side 4978/head
Loic Blot [Sun, 1 Jan 2017 15:13:01 +0000 (16:13 +0100)]
Breath cheat fix: server side

Breath is now handled server side. Changing this behaviour required some modifications to core:

* Ignore TOSERVER_BREATH package, marking it as obsolete
* Clients doesn't send the breath to server anymore
* Use PlayerSAO pointer instead of peer_id in Server::SendPlayerBreath to prevent a useless lookup (little perf gain)
* drop a useless static_cast in emergePlayer

7 years agoFix /grant & /revoke not working with custom auth handler (#4974)
Dorian Wouters [Sat, 31 Dec 2016 17:12:26 +0000 (18:12 +0100)]
Fix /grant & /revoke not working with custom auth handler (#4974)

core.auth_table is not supposed to be accessed directly.