| Commit message (Collapse) | Author | Age |
|
|
|
| |
fixes #12073
|
| |
|
| |
|
|
|
| |
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
|
| |
|
| |
|
|
|
|
| |
(#11662)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit deprecates the forward, backward, left, and right binary
inputs currently used for player movement in the PlayerControl struct.
In their place, it adds the movement_speed and movement_direction
values, which represents the player movement is a polar coordinate
system.
movement_speed is a scalar from 0.0 to 1.0. movement_direction is
an angle from 0 to +-Pi:
FWD
0
_
LFT / \ RGT
-Pi/2 | | +Pi/2
\_/
+-Pi
BCK
Boolean movement bits will still be set for server telegrams and
Lua script invocations to provide full backward compatibility.
When generating these values from an analog input, a direction is
considered active when it is 22.5 degrees away from either
orthogonal axis.
Co-authored-by: Markus Koch <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
|
| |
|
|
|
| |
i.e. checks for duplicate logins before sending all media data to the client.
|
|
|
|
| |
Also changes if/if to switch/case
|
| |
|
|
|
| |
The server must have authority about attachments. This commit ignores any player movement packets as long they're attached.
|
|
|
|
| |
fixes #7643
|
|
|
|
|
|
|
|
|
| |
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
|
| |
|
|
|
| |
specifically: after the peer has already disappeared
|
| |
|
|
|
|
| |
closes #10434
|
| |
|
|
|
| |
Change dangerous pointer to unique_ptr for automated deletion.
|
| |
|
|
|
|
|
|
| |
* Code cleanup in serverpackethandler
* do not define p_under unless a node is pointed
* use switch-case and reduce indentation
|
| |
|
|
|
|
| |
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
|
|
|
| |
Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
|
|
|
|
|
|
| |
Replace on_auth_fail callback with more versatile on_authplayer
Better clarify account login process in Lua API documentation
Change initial timestamp for newly registered accounts to -1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Server::overrideDayNightRatio doesn't require to return bool
There is no sense to sending null player, the caller should send a valid object
* Server::init: make private & cleanup
This function is always called before start() and loads some variables which can be loaded in constructor directly.
Make it private and call it directly in start
* Split Server inventory responsibility to a dedicated object
This splits permit to found various historical issues:
* duplicate lookups on player connection
* sending inventory to non related player when a player connects
* non friendly lookups on detached inventories ownership
This reduce the detached inventory complexity and also increased the
lookup performance in a quite interesting way for servers with thousands
of inventories.
|
| |
|
|
|
|
| |
* Add server side translations capability
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
The variable name changed but this didn't cause merge conflicts, so it wasn't caught before.
|
| |
|
|
|
| |
Makes 'get_wield_item' to return the "main" ItemStack
|
|
|
|
|
| |
The line declared a variable "m_con" instead of locking m_con.
getClient() doesn't need this anyway, so remove it.
|
| |
|
| |
|
|
|
|
| |
Applies to player and detached inventories
|
|
|
|
|
| |
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.
|
|
|
| |
Finish getNode cleanup
|
|
|
|
| |
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
|
|
|
|
| |
This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redundancy in Client
|
|
|
|
| |
Add isImmortal server-side for proper enable_damage handling
Rework log messages
|