aboutsummaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2017-09-12Network: Remove large parts of deprecated legacy code (#6404)SmallJoker
Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
2017-09-12Fix failing linter (travis)sfan5
2017-09-05Use a Buffer instead of SharedBuffer in ConnectionCommandLoic Blot
This fixes #6373
2017-09-05Network protocol documentation: Add 'can_zoom' to version 36paramat
2017-09-04Implement minetest.register_can_bypass_userlimit (#6369)Loïc Blot
* Implement minetest.register_on_userlimit_check This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP Only one mod needs to permit it. Move core part for builtin privileges checks to builtin
2017-09-04Re-apply previous commit with a typo fixLoïc Blot
2017-09-04Revert "Network: fix a concurrency problem, by re-adding a copy in ↵Loïc Blot
ConnectionCommand" This reverts commit 5b04f5e7d231437b534f4cad39da78624d97c584.
2017-09-04Network: fix a concurrency problem, by re-adding a copy in ConnectionCommandLoïc Blot
2017-09-03Network part requires SharedBuffers to be pass as valueLoic Blot
This can trigger unreproductible crashes due to concurrency problem on SharedBuffers This fixes #6354
2017-08-29Network proto handlers/container fixes (#6334)Loïc Blot
* Fix HP transport + some double <-> float problems TOCLIENT_HP transport u16 hp as a u8, use u16 HP, this prevent HP over 255 to overflow across network * Fix more double/float problem in serverpackethandler & remove implicit struct type for TileAnimationParams * Fix connection unittests container
2017-08-29Bump minimal protocol version to 36 (#6319)SmallJoker
* Bump minimal protocol version to 36 Item/Node/TileDef, NodeBox, TileAnimation: Remove old compat code * Accept future serialisation versions
2017-08-28Clientevent refactor (#6320)Loïc Blot
* Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
2017-08-28Pass SharedBuffer as value to increment reference countLoïc Blot
This should fix #6332 Refcount is not increased due to reference, it can make this refcount incorrect in a multithread context
2017-08-25Network cleanup (#6310)Loïc Blot
* 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-24Add clientside translations.Ekdohibs
2017-08-24Network cleanup (#6302)Loïc Blot
* Cleanup network headers * Move peerhandler to a specific header to reduce compilation times * Move socket.cpp/h to network folder * More work * Network code cleanups * Move socket.{cpp,h} to network folder * Move Address object to network/address.{cpp,h} * Move network exceptions to network/networkexceptions.h * Client: use unique_ptr for Connection * Server/ClientIface: use shared_ptr for Connection * Format fixes * Remove socket.cpp socket.h from clang-format whitelist * Also fix NetworkPacket code style & make it under clang-format
2017-08-24Fix OSX builds (closes #6289, fixes #6270) (#6306)Pavel Puchkin
Of course, this is not ideal solution, but we want our users to be happy in the first place, right?
2017-08-20Minimap: Add new HUD flag for minimap radar modeparamat
Flag default is true to not change default behaviour. The existing minimap HUD flag remains the master control for minimap.
2017-08-20Modernize source code: last part (#6285)Loïc Blot
* 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-19Code modernization: subfolders (#6283)Loïc Blot
* 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-18Optimize headers (part 2) (#6272)Loïc Blot
* Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
2017-08-18Add missing ctime include (#6269)adrido
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2017-08-17Typo fix in compat code from commit 1d8d01074fdb52946f81110bebf1d001185b394bLoic Blot
2017-08-16ClientInterface: add a function to verify (correctly) if user limit was ↵Loïc Blot
reached (#6258) * ClientInterface: add a function to verify (correctly) if user limit was reached CS_HelloSent is a better indicator of active slots than CS_Created, which are session objects created after init packet reception Switch existing checks to ClientInterface::isUserLimitReached() Use range-based for loop for getClientIds() used function too This will fix #6254 (not the memory overhead if init is flooded)
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-08-15server.cpp: code modernizationLoic Blot
* Use more for range based loops * Simplify some tests * Code style fixes * connection.h: better PeerChange constructor instead of creating uninitalized object and then affect variables
2017-08-09Step height: Add as a player object propertyparamat
Add settable player step height using the existing object property. Breaks compatibility with old clients, add to protocol version 35.
2017-07-25Network protocol: Document settable player collisionbox (#6168)Paramat
2017-07-18[CSM] Add flavour limits controlled by server (#5930)Loïc Blot
* [CSM] Add flavour limits controlled by server Server send flavour limits to client permitting to disable or limit some Lua calls * Add limits for reading nodedefs and itemdefs * flavour: Add lookup node limits * Merge get_node_or_nil into get_node. Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason * Add node range customization when noderange flavour is enabled (default 8 nodes) * Limit nodes range & disable chat message sending by default * Bump protocol version
2017-07-16Chat protocol rewrite (#5117)Loïc Blot
* New TOCLIENT_CHAT_MESSAGE packet * Rename old packet to TOCLIENT_CHAT_MESSAGE_OLD for compat * Handle TOCLIENT_CHAT_MESSAGE new structure client side * Client chat queue should use a specific object * SendChatMessage: use the right packet depending on protocol version (not complete yet) * Add chatmessage(type) objects and handle them client side (partially) * Use ChatMessage instead of std::wstring server side * Update with timestamp support
2017-07-01C++11 cleanup inventorymanager (#6077)Vincent Glize
* C++11 cleanup inventorymanager
2017-06-21C++11 cleanup on constructors dir network (#6021)Vincent Glize
* C++11 cleanup on constructors dir network
2017-06-19Verify HudSetParams input when hotbar textures are set (#6013)Loïc Blot
* Verify HudSetParams input when hotbar textures are set This fix #6011
2017-06-17Cpp11 initializers 2 (#5999)Loïc Blot
* C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
2017-06-14Remove legacy content_abm.{cpp,h}Loïc Blot
2017-06-11Fix the serialization error by ff73c7a (#5964)Rui
2017-06-11Use thread_local instead from some static settings (#5955)Loïc Blot
thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
2017-06-11Sound: Add pitch option (#5960)Rui
* Sound: Add pitch option
2017-06-08Have the server send the player list to the client (#5924)red-001
* Have the server send the player list to the client Currently the client generates the player list based on the Client active object list, the issue with this is that we can't be sure all player active objects will be sent to the client, so this could result in players showing up when someone run `/status` but auto complete not working with their nick and CSM not being aware of the player
2017-06-06Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot
* Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
2017-06-06Remove old network code (#5921)red-001
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-26Time: Change old `u32` timestamps to 64-bit (#5818)SmallJoker
MacOSX build fix + cleanups
2017-05-19When minimap is disabled in configuration, really disable it (#5771)Loïc Blot
* When minimap is disabled in configuration, really disable it
2017-05-05Add missing server sending rule for bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2Loic Blot
2017-05-03Fading soungs: Fix client crash on older serversSmallJoker
2017-05-02Set sky API: Add bool for clouds in front of custom skyboxparamat
Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
2017-05-03Sneak: Improve and fix various thingsSmallJoker
Remove useless `got_teleported`. Fix jitter when walking against the sneak limits. Fix damage evading on sneak ladders.
2017-05-03Sound API: Add fading soundsBrandon