aboutsummaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
AgeCommit message (Collapse)Author
2022-04-28Clean up some auth packet handling related codesfan5
2022-04-28Fix password changing getting stuck if wrong password is entered oncesfan5
2021-10-12Remove a few unused functions reported by callcatcher (#11658)SmallJoker
2021-04-05Reserve vectors before pushing and other code quality changes (#11161)sfan5
2021-01-31Cache client IP in RemoteClient so it can always be retrieved (#10887)sfan5
specifically: after the peer has already disappeared
2020-11-07Revert #10495 and simplify.Lars
2020-11-03Slight simplification and optimization of RemoteClient.Lars
2020-10-27Avoid resending near blocks unnecessarily.Lars
2020-10-13Rely on max_simultaneous_block_sends_per_client to limit blocks sent to the ↵Lars
client.
2020-10-04Add First Person Attachments (#10360)Jordan Snelling
Fixes some other third person camera specific attachments. Implements a single new flag for entities to be forced visible in first person mode. Old mods do not need to be updated to use the new flag and are fully backwards compatible.
2020-05-24Fix constant re-queueing of emerges that will always be unsuccessfulsfan5
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-04-11Move PlayerSAO to dedicated filesLoic Blot
2019-08-17ClientInterface: Use recursive mutex to prevent freeze in on_newplayer() (#8808)SmallJoker
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* 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).
2018-07-12Reduce block load glitchesLars Hofhansl
See #7542 This reduces glitches in deep water and underground caves.
2018-07-03Zoom: Correctly verify client passed zoom at the server (#7526)lhofhansl
Fixes generation of distant world when not zooming in creative mode (in creative mode zoom FOV is 15 degrees).
2018-05-15Use server's zoom fov for distant world loading.Lars Hofhansl
2018-04-15FOV: Raise lower limit to avoid zoom-loading of distant world (#7234)Paramat
In the client, raise lower limit from 30 to 45 degrees, to avoid server seeing this as a zoom and loading world beyond the server-set limit. Add minimum in settingtypes.txt and enforce lower limit when set using minetest.conf. In the server, distrust the client-sent FOV if below the heuristic zoom threshold and use the player object property 'zoom_fov' to check it, to protect against hacked clients.
2018-03-09Drop less performant Server::setBlockNotSent for ↵Loic Blot
ClientInterface::markBlockposAsNotSent
2017-11-29Turn off verbose info message introduced accidentally with ae9b1aaLars Hofhansl
2017-11-15Allow zoom to actually show more data.Lars Hofhansl
This allows the client to retrieve blocks at a greater distance from the server, thus allowing for a real zoom.
2017-10-25Reduce server FOV with forward speedLars Hofhansl
This causes blocks in front of the player to be rendered sooner and blocks in the periphal view (that would soon be out of view) a bit later. Overall this leads to smoother rendering as the player is moving around.
2017-10-19Set range of blocks to retrieve per roundtrip to 2.Lars Hofhansl
This is a small, partial revert of #6483, which had set this to 1.
2017-10-15Cache server config settings. (#6530)lhofhansl
* Cache server config settings.
2017-10-13Retrieve a small cone of blocks in the direction of the players velocity.Lars Hofhansl
This helps retrieving the right set of blocks when the player is falling, traveling on cart, or in general traveling in a direction different from the view direction.
2017-09-27Fix some forgotten u16 -> session_t in ad7daf7b52348e1b71aa803be10de5b2134cba11Loic Blot
2017-09-27Add session_t typedef + remove unused functions (#6470)Loïc Blot
* Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
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-30Remove DSTACK support (#6346)Loïc Blot
Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
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-20Modernize code: very last fixes (#6290)Loïc Blot
Last modernization fixes
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-14Player::getSpeed/setSpeed use const refsLoic Blot
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-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-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-20Various code cleanup & little performance improvement on HTTP download (#5772)Loïc Blot
* Disable or remove unused enum members/functions * Tiny code style fixes * Make some functions const * Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-06Clean up numeric.h and split FacePositionCache from itShadowNinja
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
2017-04-28Clean up getTime helpersShadowNinja
This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
2017-04-14ClientIface::sendToAll: honor packet configuration (#5590)Loïc Blot
2017-03-20Map generation limit: Rewriteparamat
The previous implementation applied the setting to blockpos_over_limit(), objectpos_over_limit() and in createSector(), causing many bugs near the world edge. First revert the previous implementation. Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity. Add a new function to mapblock.h called blockpos_over_mapgen_limit() that checks against the map_generation_limit setting, and call this only from the code that decides where mapgen stops. Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the chance of bugs, there is no need to use map_generation_limit here.
2017-03-15Use true distance for block priority.Lars Hofhansl
2017-03-11Allow server side occlusion culling.Lars Hofhansl
2017-02-13Lighting: Update lighting at block loadingDániel Juhász
This commit updates mapblocks' light if necessary when they are loaded. This removes ghost lighting.
2017-01-20Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)red-001
2017-01-08Move ServerEnvironment to dedicated cpp/header filesLoic Blot
* also cleanup some unneeded inclusions