| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ClientInterface::markBlockposAsNotSent
|
| |
|
|
|
|
|
| |
This allows the client to retrieve blocks at a greater distance
from the server, thus allowing for a real zoom.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is a small, partial revert of #6483, which had set this to 1.
|
|
|
|
| |
* Cache server config settings.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
Also remove the setting 'send_pre_v25_init'
Keep old enum entries for obsolete commands
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
Last modernization fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
* Cleanup various headers to reduce compilation times
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
MacOSX build fix + cleanups
|
|
|
|
|
|
| |
* Disable or remove unused enum members/functions
* Tiny code style fixes
* Make some functions const
* Replace ClientMediaDownloader std::unordered_map with std::map
|
|
|
|
|
| |
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
This commit updates mapblocks' light if necessary when they are loaded.
This removes ghost lighting.
|
| |
|
|
|
|
| |
* also cleanup some unneeded inclusions
|
| |
|
|
|
|
|
|
|
| |
settings. (#4811)
Optimize/adjust blocks and active blocks sent at the server based on client settings.
|
|
|
|
|
|
|
|
| |
The client would not compute the distance from the camera to
to a mapblock correctly. The result was that blocks that were in
view (i.e. not beyond the fog limit) would not be rendered.
With the improved distance computation, a range adjustment that
existed in clientiface.cpp is no longer required.
|
|
|
|
|
| |
Use unused range argument in 'isBlockInSight()' to limit mapblock sends
to a sphere of radius 'max block send distance'.
|
| |
|
|
|
|
| |
glitches. (#4686)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO
* Move breath to PlayerSAO & LocalPlayer
* Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO
* Migrate m_yaw from Player to LocalPlayer for client
* Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it
* Move pitch to LocalPlayer & PlayerSAO
* Move m_position from Player to LocalPlayer
* Move camera_barely_in_ceiling to LocalPlayer as it's used only there
* use PlayerSAO::m_base_position for Server side positions
* remove a unused variable
* ServerActiveObject::setPos now uses const ref
* use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded
* Move hp from Player to LocalPlayer
* Move m_hp from LuaEntitySAO to UnitSAO
* Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
|
| |
|
|
|
|
| |
all names
|
|
|
|
|
|
|
| |
* ClientEnvironment now uses UNORDERED MAP for active objects
* Use RemotePlayer and LocalPlayer everywhere it's possible
* Minor code style fixes
* Drop Client::getBreath() unused function
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd
Other improvements:
* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As stated in this forum thread [1], I noticed that there is a
2 second interval in which inventory changes are shown on the
client. @yyt16384 found the source of these 2 seconds:
m_nothing_to_send_pause_timer is set to 2.0 every time there
are no changes to make, but this timer is not reset when
SetBlockNotSent or setBlocksNotSent are invoked. So in worst
case, the changed block will be sent over 2 seconds too late.
With this change, changed inventories are updated almost
immediately, but it causes additional connection load.
|
|
|
|
| |
These names are reserved for the compiler/library implementations.
|
|
|
|
|
| |
Fixes minetest.get_player_information segfault due
to out of bounds access problems, when compiled as debug build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename everything.
* Strip J prefix.
* Change UpperCamelCase functions to lowerCamelCase.
* Remove global (!) semaphore count mutex on OSX.
* Remove semaphore count getter (unused, unsafe, depended on internal
API functions on Windows, and used a hack on OSX).
* Add `Atomic<type>`.
* Make `Thread` handle thread names.
* Add support for C++11 multi-threading.
* Combine pthread and win32 sources.
* Remove `ThreadStarted` (unused, unneeded).
* Move some includes from the headers to the sources.
* Move all of `Event` into its header (allows inlining with no new includes).
* Make `Event` use `Semaphore` (except on Windows).
* Move some porting functions into `Thread`.
* Integrate logging with `Thread`.
* Add threading test.
|
| |
|