oweals/minetest.git
9 years agoUpdate Android Makefile
Maksim Gamarnik [Sat, 7 Mar 2015 12:34:31 +0000 (14:34 +0200)]
Update Android Makefile

ARMv7 default build
Update curl
Update OpenSSL

9 years agoHeightmaps: Fix uninitialised values in mgv5/mgv6. findGroundLevel: Return -MAP_GENER...
paramat [Sat, 7 Mar 2015 03:15:12 +0000 (03:15 +0000)]
Heightmaps: Fix uninitialised values in mgv5/mgv6. findGroundLevel: Return -MAP_GENERATION_LIMIT if surface not found

9 years agoOptimize Profiler::avg()
gregorycu [Wed, 21 Jan 2015 13:25:06 +0000 (00:25 +1100)]
Optimize Profiler::avg()

9 years agoDon't use luaL_checkstring to read node names, it's only for arguments
ShadowNinja [Sun, 8 Mar 2015 01:01:59 +0000 (20:01 -0500)]
Don't use luaL_checkstring to read node names, it's only for arguments

This caused confusing error messages like "argument #4 to set_node is not a string."

9 years agoAdd Turkish comment translation to minetest.desktop
Mahmut Elmas [Wed, 4 Mar 2015 19:55:47 +0000 (21:55 +0200)]
Add Turkish comment translation to minetest.desktop

9 years agoAdd more Android build files to .gitignore
est31 [Sat, 7 Mar 2015 18:13:42 +0000 (19:13 +0100)]
Add more Android build files to .gitignore

9 years agoRespect game mapgen flags and save world noise params 2404/head
ngosang [Mon, 26 Jan 2015 11:44:49 +0000 (12:44 +0100)]
Respect game mapgen flags and save world noise params

9 years agoFix RUN_IN_PLACE broken due to invalid usage of assert
sapier [Sat, 7 Mar 2015 14:22:35 +0000 (15:22 +0100)]
Fix RUN_IN_PLACE broken due to invalid usage of assert

9 years agoFor usages of assert() that are meant to persist in Release builds (when NDEBUG is...
Craig Robbins [Fri, 6 Mar 2015 10:21:51 +0000 (20:21 +1000)]
For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives

9 years agoImprove Clouds::render mathematics
Loic Blot [Sat, 7 Mar 2015 12:23:38 +0000 (13:23 +0100)]
Improve Clouds::render mathematics

9 years agoFix Android text bug (no text displaying)
Craig Robbins [Sat, 7 Mar 2015 05:09:27 +0000 (15:09 +1000)]
Fix Android text bug (no text displaying)

9 years agoDungeongen: Optionally set ignore to be untouchable to disable floating dungeons
paramat [Fri, 6 Mar 2015 04:46:05 +0000 (04:46 +0000)]
Dungeongen: Optionally set ignore to be untouchable to disable floating dungeons

9 years agoDon't start a server for map migration 2395/head
ShadowNinja [Fri, 27 Feb 2015 07:24:07 +0000 (02:24 -0500)]
Don't start a server for map migration

9 years agoClean up database API and save the local map on an interval
ShadowNinja [Sun, 16 Nov 2014 20:31:57 +0000 (15:31 -0500)]
Clean up database API and save the local map on an interval

9 years agoBiome API: Enable decorations placed on water
paramat [Thu, 5 Mar 2015 01:53:11 +0000 (01:53 +0000)]
Biome API: Enable decorations placed on water

Add schematic decoration force placement flag

9 years agoImprove group-based connection between raillike nodes
BlockMen [Sun, 22 Feb 2015 14:12:05 +0000 (15:12 +0100)]
Improve group-based connection between raillike nodes

9 years agol_get_modnames: Compare using std::sort instead of a custom function which does same...
Loic Blot [Thu, 5 Mar 2015 19:12:54 +0000 (20:12 +0100)]
l_get_modnames: Compare using std::sort instead of a custom function which does same work

9 years agocollisionMoveSimple: use std::vector instead of std::list, this improve the performances
Loic Blot [Thu, 5 Mar 2015 17:08:19 +0000 (18:08 +0100)]
collisionMoveSimple: use std::vector instead of std::list, this improve the performances

9 years agoProfilerGraph: Use std::list instead of std::vector
Loic Blot [Thu, 5 Mar 2015 16:57:36 +0000 (17:57 +0100)]
ProfilerGraph: Use std::list instead of std::vector

9 years agoFix mapgen using unitialised height map values
Craig Robbins [Thu, 5 Mar 2015 06:25:53 +0000 (16:25 +1000)]
Fix mapgen using unitialised height map values

9 years agoUse std::queue for HTTPFetchRequest and std::vector for log_output instead of std...
Loic Blot [Thu, 5 Mar 2015 15:20:56 +0000 (16:20 +0100)]
Use std::queue for HTTPFetchRequest and std::vector for log_output instead of std::list

9 years agoFix issue #2441: crash on respawn, since a conversion std::list to std::vector on...
Loic Blot [Thu, 5 Mar 2015 14:34:39 +0000 (15:34 +0100)]
Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap
* Remove disabled code in ClientMap::renderMap, disabled since a long time

9 years agoReplace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp...
Loic Blot [Thu, 5 Mar 2015 10:52:57 +0000 (11:52 +0100)]
Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/

9 years agoServer.cpp Use std::list instead of std::vector for playSound, fillMediaCache, sendRe...
Loic Blot [Thu, 5 Mar 2015 10:39:05 +0000 (11:39 +0100)]
Server.cpp Use std::list instead of std::vector for playSound, fillMediaCache, sendRequestedMedia, sendMediaAnnouncement and related functions

9 years agoServer::AsyncRunStep: buffered_messages now uses std::vector instead of std::list...
Loic Blot [Thu, 5 Mar 2015 10:18:17 +0000 (11:18 +0100)]
Server::AsyncRunStep: buffered_messages now uses std::vector instead of std::list. * sendRemoveNode and sendAddNodes are also converted as a side effect

9 years agoFix some rendering glitches 2406/head
BlockMen [Thu, 26 Feb 2015 13:45:31 +0000 (14:45 +0100)]
Fix some rendering glitches

- Fixes particle draworder
- Fixes nodehighlighting

9 years agoPerformance improvement: Use std::list instead of std::vector for request_media,...
Loic Blot [Thu, 5 Mar 2015 09:43:08 +0000 (10:43 +0100)]
Performance improvement: Use std::list instead of std::vector for request_media, Server::getModNames, Environment::m_simple_objects.
* Also remove unused Server::m_modspaths

9 years agoRemove Queue class which uses std::list and use native std::queue
Loic Blot [Wed, 4 Mar 2015 16:48:07 +0000 (17:48 +0100)]
Remove Queue class which uses std::list and use native std::queue

9 years agoFix memory leak in MapgenV6
Craig Robbins [Thu, 5 Mar 2015 05:17:37 +0000 (15:17 +1000)]
Fix memory leak in MapgenV6

9 years agoCavegen, mgv5: Cleanup code
paramat [Wed, 4 Mar 2015 10:14:07 +0000 (10:14 +0000)]
Cavegen, mgv5: Cleanup code

Conf.example: Update mgv5 mapgen params
Mgv7: Lava caves only below -256

9 years agoUse std::vector instead of std::list in StaticObjectList and MutexedMap::getValues()
Loic Blot [Wed, 4 Mar 2015 16:18:57 +0000 (17:18 +0100)]
Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues()

9 years agoABMHandler and player_collisions use sequential read/write. Switch from std::list...
Loic Blot [Wed, 4 Mar 2015 15:58:04 +0000 (16:58 +0100)]
ABMHandler and player_collisions use sequential read/write. Switch from std::list to std::vector
* Also remove dead code Map::unloadUnusedData which is dead since a long time

9 years agoClientInterface::getClientIDs doesn't need a std::list. Use a std::vector for better...
Loic Blot [Wed, 4 Mar 2015 15:30:24 +0000 (16:30 +0100)]
ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector for better perfs

9 years agoWe always know playerSAO when calling SendInventory. Using it instead of searching...
Loic Blot [Wed, 4 Mar 2015 14:27:53 +0000 (15:27 +0100)]
We always know playerSAO when calling SendInventory. Using it instead of searching it via peer_id

9 years agoRadius parameter for /deleteblocks here
SmallJoker [Wed, 4 Mar 2015 14:10:00 +0000 (00:10 +1000)]
Radius parameter for /deleteblocks here

9 years agoSend Position packet on event, don't check it at each AsyncRunStep.
Loic Blot [Wed, 4 Mar 2015 11:19:26 +0000 (12:19 +0100)]
Send Position packet on event, don't check it at each AsyncRunStep.
* This permit to cleanup the player checking loop

9 years agoASyncRunStep doesn't need to lock when do setTimeOfDaySpeed.
Loic Blot [Wed, 4 Mar 2015 10:46:31 +0000 (11:46 +0100)]
ASyncRunStep doesn't need to lock when do setTimeOfDaySpeed.
* setTimeOfDaySpeed already lock a mutex when modify the value, we don't need to lock all environment.
* add a fine grain lock for getTimeOfDay and setTimeOfDay to solve environment multithread modifications on this value

9 years agoSend Inventory packet on event, don't check it at each AsyncRunStep.
Loic Blot [Wed, 4 Mar 2015 10:29:34 +0000 (11:29 +0100)]
Send Inventory packet on event, don't check it at each AsyncRunStep.
* Call UpdateCrafting into SendInventory because this functions is only called before SendInventory
* Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id
* m_env_mutex don't need to be used with this modification because it's already locked before the calls

9 years agoRemove unused m_wielded_item_not_sent
Loic Blot [Tue, 3 Mar 2015 16:36:54 +0000 (17:36 +0100)]
Remove unused m_wielded_item_not_sent

9 years agoSend Breath packet on event, don't check it at each AsyncRunStep
Loic Blot [Tue, 3 Mar 2015 15:23:47 +0000 (16:23 +0100)]
Send Breath packet on event, don't check it at each AsyncRunStep

9 years agoSend Player HP when setHP (or a setHP caller) is called instead of looping and testin...
Loic Blot [Mon, 2 Mar 2015 16:31:31 +0000 (17:31 +0100)]
Send Player HP when setHP (or a setHP caller) is called instead of looping and testing the state change.

9 years agoFix occlusion
Miguel Almeida [Sat, 31 Jan 2015 15:49:44 +0000 (15:49 +0000)]
Fix occlusion

9 years agoFix narrow_to_wide_c (ANDROID)
Craig Robbins [Mon, 2 Mar 2015 03:16:01 +0000 (13:16 +1000)]
Fix narrow_to_wide_c (ANDROID)

* Ensure converted string is NUL terminated
* Restore logic to that used prior to 9e2a9b5

9 years agoMgv6: Add heightmap. Do not make large caves that are entirely above ground
paramat [Sun, 1 Mar 2015 01:30:47 +0000 (01:30 +0000)]
Mgv6: Add heightmap. Do not make large caves that are entirely above ground

9 years agoAdd /setpassword and /clearpassword logging 2400/head
est31 [Fri, 27 Feb 2015 21:54:16 +0000 (22:54 +0100)]
Add /setpassword and /clearpassword logging

9 years agoAdd Turkish language
mahmutelmas06 [Wed, 25 Feb 2015 11:18:02 +0000 (20:18 +0900)]
Add Turkish language

9 years agoUpdate minetest.po
Rui [Sun, 22 Feb 2015 12:54:20 +0000 (21:54 +0900)]
Update minetest.po

9 years agoRevert "Fix particles draworder" (issue #2388)
Loic Blot [Fri, 27 Feb 2015 13:15:17 +0000 (14:15 +0100)]
Revert "Fix particles draworder" (issue #2388)

This reverts commit c09d026f0561ee3c6db821a7e193716f724a0e4a.

9 years agoChange find_surface_nodes_in_area to find_nodes_in_area_under_air
Craig Robbins [Fri, 27 Feb 2015 11:42:00 +0000 (21:42 +1000)]
Change find_surface_nodes_in_area to find_nodes_in_area_under_air

9 years agoAdd find_surface_nodes_in_area LUA call which permit to only get the nodes which...
Loic Blot [Sun, 22 Feb 2015 16:01:03 +0000 (17:01 +0100)]
Add find_surface_nodes_in_area LUA call which permit to only get the nodes which touch air. This permit to massively improve performance for mods like plantlife

9 years agoWrap lines longer than 80 characters in lua_api.txt ...and minor formating changes
rubenwardy [Sun, 22 Feb 2015 17:12:55 +0000 (17:12 +0000)]
Wrap lines longer than 80 characters in lua_api.txt ...and minor formating changes

9 years agoFix minor memory leak (Android)
Craig Robbins [Fri, 27 Feb 2015 03:40:27 +0000 (13:40 +1000)]
Fix minor memory leak (Android)

9 years agoBiome API: Re-calculate biome at every surface in a mapchunk column
paramat [Tue, 24 Feb 2015 04:06:05 +0000 (04:06 +0000)]
Biome API: Re-calculate biome at every surface in a mapchunk column

9 years agoAdd camera smoothing and cinematic mode (F8)
rubenwardy [Sun, 15 Feb 2015 19:27:15 +0000 (19:27 +0000)]
Add camera smoothing and cinematic mode (F8)

9 years agoRename --do-unittests to --run-unittests as @Zeno- and @sfan5 requested
Loic Blot [Tue, 24 Feb 2015 07:56:52 +0000 (08:56 +0100)]
Rename --do-unittests to --run-unittests as @Zeno- and @sfan5 requested

9 years agoOptimise MapBlockMesh related functions
gregorycu [Mon, 23 Feb 2015 13:20:06 +0000 (23:20 +1000)]
Optimise MapBlockMesh related functions

Directely or indirectly optimises the following functions:

* MapBlockMesh::MapBlockMesh
* MapBlockMesh::getTileInfo
* MapBlockMesh::makeFastFace
* MapBlockMesh::getSmoothLightCombined

9 years agoFix wrapDegrees family of functions
Craig Robbins [Mon, 23 Feb 2015 06:25:14 +0000 (16:25 +1000)]
Fix wrapDegrees family of functions

wrapDegrees() (renamed to modulo360f)
wrapDegrees_0_360
wrapDegrees_180

Minor errors were present in previous versions; see issue #2328

9 years agoAdd src/network/CMakeFiles/ and src/client/CMakeFiles to gitignore
4Evergreen4 [Sun, 22 Feb 2015 19:28:15 +0000 (14:28 -0500)]
Add src/network/CMakeFiles/ and src/client/CMakeFiles to gitignore

9 years agoDisallow object:remove() if the object is a player
Kahrl [Mon, 23 Feb 2015 06:48:51 +0000 (16:48 +1000)]
Disallow object:remove() if the object is a player

Rebased by Zeno- (conflict in lua_api.txt)

9 years agoFix serialization of floating point numbers
ShadowNinja [Sat, 21 Feb 2015 18:16:18 +0000 (13:16 -0500)]
Fix serialization of floating point numbers

9 years agoImprove FindIrrlicht.cmake module
Markus Koschany [Sat, 21 Feb 2015 16:46:33 +0000 (17:46 +0100)]
Improve FindIrrlicht.cmake module

Linux distributions prefer to link against a shared version of the Irrlicht
engine instead of using embedded code copies of the same. Search for this
shared version first and use that but fall back to the static version if it
does not exist.

This also fixes https://github.com/minetest/minetest/issues/2163

9 years agoAdd mod.conf file support This new file only permits to specify a mod name for now
kaeza [Sat, 21 Feb 2015 17:04:47 +0000 (18:04 +0100)]
Add mod.conf file support This new file only permits to specify a mod name for now

9 years agoFix android build
Loic Blot [Sat, 21 Feb 2015 16:37:48 +0000 (17:37 +0100)]
Fix android build

9 years agoFix some memory leaks on packet sending.
Loic Blot [Sat, 21 Feb 2015 16:24:27 +0000 (17:24 +0100)]
Fix some memory leaks on packet sending.

9 years agoMove hex.h to util/
Loic Blot [Sat, 21 Feb 2015 13:17:36 +0000 (14:17 +0100)]
Move hex.h to util/

9 years agoFix particles draworder 2368/head
BlockMen [Fri, 20 Feb 2015 23:11:26 +0000 (00:11 +0100)]
Fix particles draworder

9 years agoMove sha1.hpp and base64.hpp to util/
Loic Blot [Sat, 21 Feb 2015 12:00:57 +0000 (13:00 +0100)]
Move sha1.hpp and base64.hpp to util/

9 years agoUse skin font for usernames (fixes #2363) 2367/head
BlockMen [Fri, 20 Feb 2015 22:10:23 +0000 (23:10 +0100)]
Use skin font for usernames (fixes #2363)

9 years agoUse proper CMakeLists.txt for network and client directories
Loic Blot [Sat, 21 Feb 2015 10:51:12 +0000 (11:51 +0100)]
Use proper CMakeLists.txt for network and client directories

9 years agoUpdate Japanese Translation
Rui [Tue, 17 Feb 2015 14:10:45 +0000 (23:10 +0900)]
Update Japanese Translation

ok @Zeno- @nerzhul

9 years agoUnit tests must be done at integration process.
Loic Blot [Thu, 19 Feb 2015 08:38:01 +0000 (09:38 +0100)]
Unit tests must be done at integration process.

* Remove --enable-unittests and --disable-unittests and add --do-unittests function
* --do-unittests function will exit 0 on success.
* minetest and minetestserver binaries are launched with --do-unittests in travis build.

9 years agoMgv5: Remove blobgen. Remove crumble and wetness noises
paramat [Wed, 21 Jan 2015 13:24:11 +0000 (13:24 +0000)]
Mgv5: Remove blobgen. Remove crumble and wetness noises

Add large pseudorandom caves below -256
De-link terrain level from water_level
Cavegen: Mgv5 large cave code

9 years agoupdate README.txt
Ner'zhul [Fri, 20 Feb 2015 09:35:39 +0000 (10:35 +0100)]
update README.txt

* prefix apt-get with sudo
* git clone minetest_game without going to folder
* execute minetest binary without going into bin folder

9 years agoTypo fix in networkprotocol.h
Ner'zhul [Thu, 19 Feb 2015 19:03:22 +0000 (20:03 +0100)]
Typo fix in networkprotocol.h

InventoryAction is in inventorymanager.h

9 years agoUncomment version patch field
BlockMen [Wed, 18 Feb 2015 22:52:51 +0000 (23:52 +0100)]
Uncomment version patch field

9 years agoBump version to 0.4.12
Perttu Ahola [Wed, 18 Feb 2015 17:50:37 +0000 (19:50 +0200)]
Bump version to 0.4.12

9 years agoAdd modname convention checking
Novatux [Wed, 18 Feb 2015 15:48:58 +0000 (16:48 +0100)]
Add modname convention checking

Fixes #2037

9 years agoServer: announce MIN/MAX protocol version supported to serverlist. Client: check...
est31 [Tue, 17 Feb 2015 00:37:14 +0000 (01:37 +0100)]
Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist

Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server

9 years agoIncrease default font_size 2314/head
BlockMen [Wed, 18 Feb 2015 11:37:53 +0000 (12:37 +0100)]
Increase default font_size

9 years agoFix font_size under windows
BlockMen [Sat, 14 Feb 2015 19:16:09 +0000 (20:16 +0100)]
Fix font_size under windows

9 years agoUse fixed size for builtin menus on non-android platforms
Perttu Ahola [Wed, 18 Feb 2015 09:45:23 +0000 (11:45 +0200)]
Use fixed size for builtin menus on non-android platforms

9 years agoUpdate missing files for Android.mk
Loic Blot [Wed, 18 Feb 2015 08:53:43 +0000 (09:53 +0100)]
Update missing files for Android.mk

9 years agoFix unused (and so, broken) enable_rollback_recording. This option must be reloaded...
Loic Blot [Tue, 17 Feb 2015 19:09:36 +0000 (20:09 +0100)]
Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable)
ok @ShadowNinja

9 years agoAndroid build fix
Loic Blot [Wed, 18 Feb 2015 08:23:24 +0000 (09:23 +0100)]
Android build fix

9 years agoFix map_seed not changed when creating a new world after login to another
fz72 [Tue, 17 Feb 2015 15:53:49 +0000 (16:53 +0100)]
Fix map_seed not changed when creating a new world after login to another

9 years agoChange many useless std::list into Environment class (m_players), ABMHandler and...
Loic Blot [Tue, 17 Feb 2015 15:49:27 +0000 (16:49 +0100)]
Change many useless std::list into Environment class (m_players), ABMHandler and ActiveBlockList::update
This improve looping performances.

9 years agoGrab GUIChatConsole::m_font, fixes segfault when changing font_size
Kahrl [Tue, 17 Feb 2015 09:29:44 +0000 (10:29 +0100)]
Grab GUIChatConsole::m_font, fixes segfault when changing font_size

9 years agoReplace std::list by std::vector into ClientMap::updateDrawList, Map::timerUpdate...
Loic Blot [Tue, 17 Feb 2015 14:28:49 +0000 (15:28 +0100)]
Replace std::list by std::vector into ClientMap::updateDrawList, Map::timerUpdate and ServerMap::save().
This will speedup the loop reading into those functions

9 years agoReplace std::list by std::vector into timerUpdate calls
Loic Blot [Tue, 17 Feb 2015 14:04:08 +0000 (15:04 +0100)]
Replace std::list by std::vector into timerUpdate calls

9 years agoIgnore old entities from 0.3.
Novatux [Tue, 17 Feb 2015 14:01:54 +0000 (15:01 +0100)]
Ignore old entities from 0.3.

9 years agoRemove old comment from Network Rework Patch 2/4
Loic Blot [Tue, 17 Feb 2015 13:49:21 +0000 (14:49 +0100)]
Remove old comment from Network Rework Patch 2/4

9 years agoReplace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap...
Loic Blot [Tue, 17 Feb 2015 13:30:32 +0000 (14:30 +0100)]
Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap::listAllLoadedBlocks and their database backends.
This adds a speedup on database migration and /clearobjects command

9 years agoSAO: re-add old ActiveObjectTypes for a future migration layer
Loic Blot [Tue, 17 Feb 2015 10:37:55 +0000 (11:37 +0100)]
SAO: re-add old ActiveObjectTypes for a future migration layer

9 years agoSAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObjectType...
Loic Blot [Mon, 16 Feb 2015 16:42:13 +0000 (17:42 +0100)]
SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused

9 years agoAdd player direction to on-screen debug text
Yaman [Mon, 16 Feb 2015 15:56:09 +0000 (01:56 +1000)]
Add player direction to on-screen debug text

(PR Modified slightly)

9 years agoAdd LevelDB and redis to Travis Linux builds
sfan5 [Wed, 28 Jan 2015 15:57:37 +0000 (16:57 +0100)]
Add LevelDB and redis to Travis Linux builds

9 years agoPerformance Improvement: Use a cache which caches result for getFacePositions.
Loic Blot [Sun, 15 Feb 2015 16:30:38 +0000 (17:30 +0100)]
Performance Improvement: Use a cache which caches result for getFacePositions.
This greatly reduce the number of std::list generated by caching the result, which is always constant for each radius selected.
In the callgrind map, you will see original:
  * 3.3M calls to std::list for 9700 calls to getFacePositions
In the modified version, you will see:
  * 3.3K calls to std::list for 6900 call to getFacePositions
Callgrind map is here: #2321

it's a huge performance improvement to l_find_node_near

9 years ago[Patch 2/4] Network rework: packet writing, sending and cleanups
Loic Blot [Fri, 16 Jan 2015 10:37:49 +0000 (11:37 +0100)]
[Patch 2/4] Network rework: packet writing, sending and cleanups

NetworkPacket.cpp:
* Remove some deprecated functions, we must use streaming interface
* m_data converted from u8* to std::vector<u8>
* Add an exporter to forge packet to Connection object
* implement operator << std::wstring. n
* implement operator << std::string
* dynamic resize when write packet content.
* fix string writing and performances.
* create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
  * Reliability
  * Transmit channel
* Implement putRawString for some ugly char (_INIT packet), and use it.
* Many packet read and write migrated
* Implement oldForgePacket to interface writing with current connection
* fix U8/char/bool writing
* fix string writing and performances.
* add some missing functions
* Use v3s16 read instead of reading x,y,z separately
* Add irr::video::SColor support into packets
* Add some missing handlers
* Add a template function to increase offset
* Throw a serialization error on packet reading (must be improved)

PacketFactories:
* Create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
* Create ClientCommandFactory, used by server to get useful informations about packet processing (sending).

Client.cpp:
* implement NetworkPacket ::Send interface.
* Move packet handlers to a dedicated file
* Remove Client::Send(SharedBuffer)

Server.cpp:
* implement NetworkPacket ::Send interface.
* Rewrite all packets using NetworkPacket
* Move packet handlers to a dedicated file
* Remove Server::Send(SharedBuffer)

ClientIface.cpp:
* Remove sendToAll(SharedBuffer<u8>)

Connection.hpp rework:
* Remove duplicate include
* Remove duplicate negation
* Remove a useless variable
* Improve code performance by using a m_peers_list instead of scanning m_peers map
* Remove Connection::Send(SharedBuffer)
* Fix useafterfree into NetworkPacket Sending
* Remove unused Connection::sendToAll

Test.cpp:
* Remove dead code
* Update tests to use NetworkPackets

Misc:
* add new wrappers to Send packets in client, using NetworkPacket
* Add NetworkPacket methods for Connection
* coding style fix
* dead code since changes cleanup
* Use v3s16 read instead of reading x,y,z separately in some packets
* Use different files to handle packets received by client and server
* Cleanup: Remove useless includes

ok @Zeno-
Tested by @Zeno- @VanessaE and @nerzhul on running servers

9 years agoFix minetest.item_eat's replace_with_item, fixes #2292
rubenwardy [Thu, 12 Feb 2015 16:57:22 +0000 (16:57 +0000)]
Fix minetest.item_eat's replace_with_item, fixes #2292

9 years agoFix unit test if there isn't a localhost address (for example FreeBSD jails), second...
Loic Blot [Sun, 15 Feb 2015 14:28:41 +0000 (14:28 +0000)]
Fix unit test if there isn't a localhost address (for example FreeBSD jails), second part