summaryrefslogtreecommitdiff
path: root/src/remoteplayer.h
Commit message (Collapse)AuthorAge
* Settings: Proper priority hierarchySmallJoker2021-01-29
| | | | | | | | | | | Remove old defaults system Introduce priority-based fallback list Use new functions for map_meta special functions Change groups to use end tags Unittest changes: * Adapt unittest to the new code * Compare Settings objects
* RemotePlayer: Remove Settings writer to Files databaseSmallJoker2021-01-29
|
* Fix code style to make clang-format happysfan52020-03-05
|
* set_sky improvements, set_sun, set_moon and set_starsJordach2020-03-05
|
* Formspecs: Introduce formspec_version to modsSmallJoker2019-09-14
|
* 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.
* Fix on_successful_save -> onSuccessfulSaveLoïc Blot2019-01-04
|
* Fix various player save issues (performance penalty on sql backends + bugs)Loïc Blot2019-01-04
| | | | | | | * PostgreSQL & SQLite3 doesn't setModified(false) on RemotePlayer, then player is saved on each server save call. This results in heavy useless writes. * PostgreSQL & SQLite3 ack engine meta write whereas db commit hasn't been performed. If commit failed write has failed. We mustn't notify engine write is done. * serializing player meta must not setModified(false) because it didn't ensure write has been done * add RemotePlayer::on_successfull_save callback to do the flag update on a successful save
* Cleanup: drop Server::hudGetHotbarImage()Loic Blot2018-03-08
| | | | Call directly accessible RemotePlayer::getHotbarImage() from server api & make it const ref
* Fix day_night_ratio_do_override not being initialised server-siderubenwardy2017-10-29
| | | | Causes get_day_night_ratio() to return unpredictable results.
* Make Player::peer_id server-side only and add getters and setters (#6478)Loïc Blot2017-09-30
| | | | | | | * Make Player::peer_id server-side only and add getters and setters Player::peer_id has no sense client side, move it to server, make it private and add setter and getter Also add some PEER_ID_INEXISTENT instead of harcoded 0
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot2017-08-19
| | | | | | | | | | | * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
|
* LINT fix since cloud API mergeLoic Blot2017-05-04
|
* Set sky API: Add bool for clouds in front of custom skyboxparamat2017-05-02
| | | | | | | Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
* Add clouds APIBen Deutsch2017-04-30
|
* Fix lint since recent player to db mergeLoic Blot2017-04-23
|
* Player data to Database (#5475)Loïc Blot2017-04-23
| | | | | | | | | | | | * Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
* Clang-format: fix some header files and remove them from whitelistLoic Blot2017-04-07
|
* Implement player attribute backend (#4155)Loïc Blot2017-01-27
| | | | | | | | | | | | | | | * This backend permit mods to store extra players attributes to a common interface. * Add the obj:set_attribute(attr, value) Lua call * Add the obj:get_attribute(attr) Lua call Examples: * player:set_attribute("home:home", "10,25,-78") * player:get_attribute("default:mana") Attributes are saved as a json in the player file in extended_attributes key They are saved only if a modification on the attributes occurs and loaded when emergePlayer is called (they are attached to PlayerSAO).
* PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul2016-10-30
| | | | | | | | | | | | | | | | | * 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
* Environment cleanupLoic Blot2016-10-09
| | | | | | | | | | | | | * Move client list to ServerEnvironment and use RemotePlayer members instead of Player * ClientEnvironment only use setLocalPlayer to specify the current player * Remove ClientEnvironment dead code on player list (in fact other players are CAO not Player objects) * Drop LocalPlayer::getPlayer(xxx) functions which aren't used. * Improve a little bit performance by using const ref list for ClientEnvironment::getPlayerNames() & Client::getConnectedPlayerNames() * Drop isLocal() function from (Local)Player which is not needed anymore because of previous changes This change permits to cleanup shared client list which is very old code. ClientEnvironment doesn't use player list anymore, it only contains the local player, as addPlayer is only called from Client constructor client side. Clients are only CAO on client side, this cleanup permit to remove confusion about player list.
* Move RemotePlayer code to its own cpp/headerLoic Blot2016-10-08