summaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
Commit message (Collapse)AuthorAge
* Fix number of tool uses being off by 1..32767 (#11110)Wuzzy2021-10-31
|
* Fix item duplication if player dies during interact callback (alternative) ↵sfan52021-10-25
| | | | (#11662)
* Fix player HP desync between client and serversavilli2021-10-12
|
* Dynamic_Add_Media v2 (#11550)sfan52021-09-09
|
* Remove redundant on_dieplayer callssavilli2021-08-28
|
* Joystick sensitivity for player movement (#11262)NeroBurner2021-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Block & report player self-interaction (#11137)Lars Müller2021-03-30
|
* Check for duplicate login in TOSERVER_INIT handler (#11017)Elias Fleckenstein2021-03-19
| | | i.e. checks for duplicate logins before sending all media data to the client.
* Protect dropping from far node inventoriesSmallJoker2021-03-07
| | | | Also changes if/if to switch/case
* Protect per-player detached inventory actionsSmallJoker2021-03-07
|
* Server-side authority for attached players (#10952)SmallJoker2021-02-15
| | | The server must have authority about attachments. This commit ignores any player movement packets as long they're attached.
* Encode high codepoints as surrogates to safely transport wchar_t over networksfan52021-02-02
| | | | fixes #7643
* Drop wide/narrow conversion functionssfan52021-02-02
| | | | | | | | | 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.
* Server GotBlocks(): Lock clients to avoid multithreading issuesSmallJoker2021-02-02
|
* Cache client IP in RemoteClient so it can always be retrieved (#10887)sfan52021-01-31
| | | specifically: after the peer has already disappeared
* Fix some minor code issues all over the placesfan52020-12-24
|
* serverpackethandler: Minor log message fixessfan52020-11-12
| | | | closes #10434
* Fix object interaction distance not being checked (#10547)rubenwardy2020-11-09
|
* Inventory: Protect Craft and Drop actions (#10353)SmallJoker2020-09-07
| | | Change dangerous pointer to unique_ptr for automated deletion.
* Prevent interacting with items out of the hotbar (#10359)Lejo2020-09-04
|
* [2] Code cleanup in serverpackethandler (#9349)HybridDog2020-09-01
| | | | | | * Code cleanup in serverpackethandler * do not define p_under unless a node is pointed * use switch-case and reduce indentation
* Prevent players accessing inventories of other players (#10341)Lars Müller2020-08-29
|
* Allow binding dig, place actions to keys; remove LMB/RMB hardcodingANAND2020-08-15
| | | | Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
* Exposing the zoom key to Lua API (#9903)Lars Müller2020-06-13
| | | Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
* Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)sorcerykid2020-05-23
| | | | | | 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
* Log protocol ver on mismatched client connect toosfan52020-05-16
|
* Server class code cleanups (#9769)Loïc Blot2020-05-07
| | | | | | | | | | | | | | | | | | | * 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.
* Server: Improve some log messages (#9820)sfan52020-05-05
|
* Add server side translations capability (#9733)EvidenceB Kidscode2020-04-25
| | | | * Add server side translations capability
* serverpackethandler: Reduce pkt->getPeerId() invocations and more (#9689)HybridDog2020-04-18
|
* Move PlayerSAO to dedicated filesLoic Blot2020-04-11
|
* Fixes around ServerActiveObject on_punch handlingsfan52020-03-05
|
* Call on_secondary_use when object is right-clickedsfan52019-11-10
|
* Fix broken buildsfan52019-09-23
| | | The variable name changed but this didn't cause merge conflicts, so it wasn't caught before.
* Punchwear (improved) (#8959)sfan52019-09-22
|
* Wieldhand: Specify which ItemStack to use (#8961)SmallJoker2019-09-21
| | | Makes 'get_wield_item' to return the "main" ItemStack
* Remove incorrect MutexAutoLocksfan52019-09-19
| | | | | The line declared a variable "m_con" instead of locking m_con. getClient() doesn't need this anyway, so remove it.
* Send ActiveObjects once right after Init2ANAND2019-09-14
|
* Formspecs: Introduce formspec_version to modsSmallJoker2019-09-14
|
* Send cumulated inventory changes only each step (#8856)SmallJoker2019-09-09
| | | | Applies to player and detached inventories
* Inventory: Send dirty lists where appropriate (#8742)SmallJoker2019-08-24
| | | | | 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.
* Merge pull request #8776 from osjc/FixGetNodeJozef Behran2019-08-10
| | | Finish getNode cleanup
* Client::Interact: Use InteractAction enum instead of numeric constantsANAND2019-08-07
| | | | This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
* Unify wield item handling (#8677)SmallJoker2019-08-07
| | | | 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
* Damage: Play no damage sound when immortal (#8350)SmallJoker2019-06-09
| | | | Add isImmortal server-side for proper enable_damage handling Rework log messages
* 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 "&".
* 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 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
* 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
* 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).