aboutsummaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
AgeCommit message (Collapse)Author
2019-09-14Send ActiveObjects once right after Init2ANAND
2019-09-14Load CSM environment after the restrictions are knownSmallJoker
Safety-guards for CSM callbacks to abort on a bad implementation Only run callbacks when the mods are loaded (and with it: builtin) Duplication checks inside constructors
2019-08-24Inventory: Send dirty lists where appropriate (#8742)SmallJoker
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
2019-08-10Implement adding velocity to player from Luasfan5
The intended usecase is knockback, but there's potential for more.
2019-08-04Fix binary-string confusion in client network codesfan5
2019-03-10Fix serialization of std::time_t by casting to u64 first (#8353)rubenwardy
Fixes #8332
2019-03-07Fix detach inventory serialisation (#8331)rubenwardy
2019-03-01Fix particle spawners not visible since CSM spawner implementation (#8289)Loïc Blot
* Drop the ID mapper, use a big u64 instead. This will permit to resync server ids properly with the manager code * Modernize some code parts (std::unordered_map, auto) * generate id on client part on U32_MAX + 1 ids, lower are for server ids
2019-02-26Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 ↵Loïc Blot
(#8288)" This reverts commit 01cd63bd3bca0192dab2834faf414b022706a77e.
2019-02-26Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)Paramat
Reverts 5dab7426451842793b183fbd961ad2ae83c8acbd "[CSM] Add functions to create particles and particlespawners."
2019-02-09Disable confirmation dialog on localhostrubenwardy
2019-01-26Add setting to disable confirmation on new player registration (#8102)Muhammad Rifqi Priyo Susanto
2019-01-03Proselytize the network. Use IEEE F32 (#8030)SmallJoker
* Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
2018-12-04Send only changed node metadata to clients instead of whole mapblock (#5268)SmallJoker
Includes newer style changes and fixes by est31 Improve the block position de-serialization Add type NodeMetadataMap
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-11-24CSM: Don't create the client script environment if CSM is disabled (#7874)Paramat
Use the CSM death formspec when CSM is enabled and use the engine death formspec when CSM is disabled. Move the CSM death formspec code to a dedicated file.
2018-10-10 Add core.remove_detached_inventory (#7684)SmallJoker
Breaks backwards compatibility for good Bump protocol version
2018-09-08Particles: Make collision with objects optional (#7682)Paramat
Also set it to false for node dig particles, as they are often created and high in number. Improve particle documentation.
2018-06-26Rename CSM flavours to restrictionsSmallJoker
& Satisfy LINT
2018-03-28Add formspec theming using prepended stringsAndrew Ward
2018-03-24Cleanup sound manager class (#7158)Loïc Blot
* Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-02-17Remove legacy chat network code. (#6954)red-001
2018-01-26Fix issues with earlier CSM HUD commit (#6940)red-001
The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
2018-01-20[CSM] Add functions to create particles and particlespawners. (#6072)red-001
2018-01-20[CSM] Add basic HUD manipulation. (#6067)red-001
* [CSM] Add basic HUD manipulation. Workaround for on_connect not working right now.
2018-01-13Add confirmation on new player registration (#6849)Muhammad Rifqi Priyo Susanto
* Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
2017-12-11CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)Loïc Blot
* CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
2017-12-10Damage: Remove damage ignore timerSmallJoker
2017-09-26Implement mod communication channels (#6351)Loïc Blot
Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method
2017-09-12Network: Fix logging into older worlds with base64 hashesSmallJoker
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-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-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-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-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-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-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-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-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-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
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-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
2017-04-30Add clouds APIBen Deutsch