summaryrefslogtreecommitdiff
path: root/src/network
Commit message (Collapse)AuthorAge
* Various network performance improvements (#8125)Jozef Behran2019-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Optimize packet construction functions Some of the functions that construct packets in connection.cpp are using a const reference to get the raw packet data to package and others use a value passed parameter to do that. The ones that use the value passed parameter suffer from performance hit as the rather bulky packet data gets a temporary copy when the parameter is passed before it lands at its final destination inside the newly constructed packet. The unnecessary temporary copy hurts quite badly as the underlying class (SharedBuffer) actually allocates the space for the data in the heap. Fix the performance hit by converting all of these value passed parameters to const references. I believe that this is what the author of the relevant code actually intended to do as there is a couple of packet construction helper functions that already use a const reference to get the raw data. * Optimize packet sender thread class Most of the data sending methods of the packet sender thread class use a value passed parameter for the packet data to be sent. This causes the rather bulky data to be allocated on the heap and copied, slowing the packet sending down. Convert these parameters to const references to avoid the performance hit. * Optimize packet receiver thread class The packet receiver and processor thread class has many methods (mostly packet handlers) that receive the packed data by value. This causes a performance hit that is actually worse than the one caused by the packet sender methods because the packet is first handed to the processPacket method which looks at the packet type stored in the header and then delegates the actual handling to one of the handlers. Both, processPacket and all the handlers get the packet data by value, leading to at least two unnecessary copies of the data (with malloc and all the slow bells and whistles of bulky classes). As there already is a few methods that use a const reference parameter for the packet data, convert all this value passed packets to const references.
* LINT fixes since recent tooling updateLoïc Blot2019-03-14
|
* Fix serialization of std::time_t by casting to u64 first (#8353)rubenwardy2019-03-10
| | | Fixes #8332
* Optimize interaction distance checker (#8193)Jozef Behran2019-03-07
| | | | | The "what" parameter is being passed by value, most likely by accident as the type is "const std::string". Convert it to a reference by adding the missing "&".
* Fix detach inventory serialisation (#8331)rubenwardy2019-03-07
|
* Fix incorrect string length check after castrubenwardy2019-03-06
|
* Fix particle spawners not visible since CSM spawner implementation (#8289)Loïc Blot2019-03-01
| | | | | * 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
* Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 ↵Loïc Blot2019-02-26
| | | | | | (#8288)" This reverts commit 01cd63bd3bca0192dab2834faf414b022706a77e.
* Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)Paramat2019-02-26
| | | | Reverts 5dab7426451842793b183fbd961ad2ae83c8acbd "[CSM] Add functions to create particles and particlespawners."
* Attend to LINT sillyness (#8276)Paramat2019-02-23
|
* Revert RTT fixes (#8187)ANAND2019-02-15
| | | | | The reverted commit 968ce9af598024ec71e9ffb2d15c3997a13ad754 is suspected (through the use of bisection) of causing network slowdowns. Revert for now as we are close to release.
* LINT fixLoïc Blot2019-02-15
|
* Consistent HP and damage types (#8167)SmallJoker2019-02-10
| | | | | Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.
* Fix Address::isLocalhost algorithmLoic Blot2019-02-09
|
* Disable confirmation dialog on localhostrubenwardy2019-02-09
|
* Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)Paul Ouellette2019-02-07
| | | | | Store the rotation in the node as a 4x4 transformation matrix internally (through IDummyTransformationSceneNode), which allows more manipulations without losing precision or having gimbal lock issues. Network rotation is still transmitted as Eulers, though, not as matrix. But it will stay this way in 5.0.
* Add setting to disable confirmation on new player registration (#8102)Muhammad Rifqi Priyo Susanto2019-01-26
|
* Fix various bugs (Anticheat, Lua helpers) (#8013)SmallJoker2019-01-06
| | | | | | | | | | | * Fix various bugs (Anticheat, Lua helpers) Anticheat: Use camera position instead of player position for shoot line calculations Lua helpers: Increase 'i' to not overwrite earlier added table values * Remove lag compensation * * 1.5 for larger selection boxes
* Proselytize the network. Use IEEE F32 (#8030)SmallJoker2019-01-03
| | | | | * Proselytize the network. Use IEEE F32 * Remove unused V2F1000 functions
* CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000)Paramat2019-01-03
| | | | | | | | | | | | Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a client was still able to add CSM code to 'builtin' to bypass that restriction, because 'builtin' is not yet verified. Until server-sent CSM and verifying of 'builtin' are complete, make 'LOAD_CLIENT_MODS' disable the loading of builtin. Clarify code comments and messages to distinguish between client-side modding and client-side scripting. 'Scripting' includes 'builtin', 'modding' does not.
* CSM: add requested CSM_RF_READ_PLAYERINFO (#8007)Loïc Blot2018-12-24
| | | | | | | | * CSM: add requested CSM_RF_READ_PLAYERINFO This new CSM limit permit to limit PLAYERINFO read from server. It affects get_player_names call
* Network: Send IEEE floats (#7768)SmallJoker2018-12-13
|
* Send only changed node metadata to clients instead of whole mapblock (#5268)SmallJoker2018-12-04
| | | | | | | Includes newer style changes and fixes by est31 Improve the block position de-serialization Add type NodeMetadataMap
* Move client-specific files to 'src/client' (#7902)Quentin Bazin2018-11-28
| | | | | Update Android.mk Remove 'src/client' from include_directories
* Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter2018-11-28
| | | | * Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
* CSM: Don't create the client script environment if CSM is disabled (#7874)Paramat2018-11-24
| | | | 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.
* Add core.remove_detached_inventory (#7684)SmallJoker2018-10-10
| | | | Breaks backwards compatibility for good Bump protocol version
* Particles: Make collision with objects optional (#7682)Paramat2018-09-08
| | | | | | Also set it to false for node dig particles, as they are often created and high in number. Improve particle documentation.
* Add protocol_version and supported package types to ContentDB urlsrubenwardy2018-07-29
|
* Fix build on gcc 5.0 (#7586)zeuner2018-07-26
|
* Remove legacy client handling code.Lars Hofhansl2018-07-14
|
* Fix bug setting channel window size.Lars Hofhansl2018-07-13
|
* Ensure that legacy mode is correctly disabled.Lars Hofhansl2018-07-13
|
* Formspecs: Remove accidental empty 'quit' fieldSmallJoker2018-07-10
|
* Rename CSM flavours to restrictionsSmallJoker2018-06-26
| | | | & Satisfy LINT
* Fix rtt >= 0.0f assertion and free_move crashSmallJoker2018-06-24
|
* RTT fixes (#7428)you2018-06-23
| | | | | | | | | | | | * Few code updates * Do not show average RTT before timing out * Fix unwanted integer division in RTTStatistics * Fix float format, prettier jitter calculation * Use +=, 0.1f -> 100.0f for stronger average updates
* Fix ipv6_server=true not accepting IPv4 connections on Windows (#7471)sfan52018-06-22
|
* Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot2018-06-13
| | | | * Server: move shutdown parts to a specific shutdown state object
* Formspec verification: Fix show_formspec inside callbacks (#7374)SmallJoker2018-05-26
|
* Fix wrong channel number representation in logs (#7205)SmallJoker2018-04-18
|
* Add reasons to on_dieplayer and on_hpchangeAndrew Ward2018-03-28
|
* Add formspec theming using prepended stringsAndrew Ward2018-03-28
|
* Cleanup sound manager class (#7158)Loïc Blot2018-03-24
| | | | | | | | | | * 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
* Fix an alone if to be with a missing elseLoic Blot2018-03-16
|
* Mitigate formspec exploits by verifying that the formspec was shown to the ↵red-0012018-02-18
| | | | | user by the server. (#6878) This doesn't check the fields in anyway whatsoever so it should only be seen as a way to mitigate exploits, a last line of defense to make it harder to exploit bugs in mods, not as a reason to not do all the usually checks.
* Remove legacy chat network code. (#6954)red-0012018-02-17
|
* Add `on_auth_fail` callback (#7039)red-0012018-02-15
| | | Called when a client fails to supply the correct password for the account it's attempting to login as.
* Fix issues with earlier CSM HUD commit (#6940)red-0012018-01-26
| | | 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.
* [CSM] Add functions to create particles and particlespawners. (#6072)red-0012018-01-20
|