summaryrefslogtreecommitdiff
path: root/src/client.h
Commit message (Collapse)AuthorAge
* Remove legacy chat network code. (#6954)red-0012018-02-17
|
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
| | | | | | | | | * Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
* Fix issues with earlier CSM HUD commit (#6940)red-0012018-01-26
| | | The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
* [CSM] Add functions to create particles and particlespawners. (#6072)red-0012018-01-20
|
* [CSM] Add basic HUD manipulation. (#6067)red-0012018-01-20
| | | | | | * [CSM] Add basic HUD manipulation. Workaround for on_connect not working right now.
* Add confirmation on new player registration (#6849)Muhammad Rifqi Priyo Susanto2018-01-13
| | | | | | | | | | | | | | * Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
* GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUILoic Blot2018-01-05
| | | | | | | | | | Game class is too huge and has too specialization on various subjects, like UI, formspecs, client, renderer. Start to move UI related things to GameUI object and cleanup them Other improvements: * updateChat: more performance on error messages by remove string copies * Initialize all game class members in definition instead of constructor (with nullptr instead of NULL) * Drop unused Client::show{GameChat,GameHud,Profiler,GameFog} * Add GameUI unittests
* CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)Loïc Blot2017-12-11
| | | | | | | | | | | | | | * CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
* Damage: Remove damage ignore timerSmallJoker2017-12-10
|
* Use Irrlicht's mesh cache for animated meshes.Lars Hofhansl2017-12-04
| | | | | | Fixes #6676. Allow animated meshes to be cached in Irrlicht's builtin mesh cache. Use Material.EmmissiveColor instead of manipulating the mesh' vertex colors.
* Implement mod communication channels (#6351)Loïc Blot2017-09-26
| | | | | | | | | | Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method
* Network: Remove large parts of deprecated legacy code (#6404)SmallJoker2017-09-12
| | | | Also remove the setting 'send_pre_v25_init' Keep old enum entries for obsolete commands
* Clientevent refactor (#6320)Loïc Blot2017-08-28
| | | | | | | | | | * Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
* Network cleanup (#6302)Loïc Blot2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | * 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
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* client.cpp: modernize codeLoic Blot2017-08-16
| | | | | * Range based for loops * Empty operator on stl containers
* [CSM] Add flavour limits controlled by server (#5930)Loïc Blot2017-07-18
| | | | | | | | | | | | | | | | | | | | * [CSM] Add flavour limits controlled by server Server send flavour limits to client permitting to disable or limit some Lua calls * Add limits for reading nodedefs and itemdefs * flavour: Add lookup node limits * Merge get_node_or_nil into get_node. Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason * Add node range customization when noderange flavour is enabled (default 8 nodes) * Limit nodes range & disable chat message sending by default * Bump protocol version
* Chat protocol rewrite (#5117)Loïc Blot2017-07-16
| | | | | | | | | | | | | * 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
* Revert "CSM: Revert "[CSM] Add send_chat_message and run_server_chatcommand""Loic Blot2017-07-15
| | | | This reverts commit bdac12761cd92960c3df83c932aa610f2322215f.
* CSM: Revert "[CSM] Add send_chat_message and run_server_chatcommand"rubenwardy2017-07-15
| | | | | Original PR: #5747. This reverts commit 39f4a2f607d44738d60db84eba4b30e3d7450204.
* Create a filesystem abstraction layer for CSM and only allow accessing files ↵red-0012017-06-30
| | | | | | | | | | | | | | | | | | that are scanned into it. (#5965) * Load client-side mods into memory before executing them. This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure. * Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory. * Fix the issues with backtrace * fix most of the issues * fix code style. * add a comment
* Isolate irrlicht references and use a singleton (#6041)Loïc Blot2017-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
* Client::makeScreenshot: remove device paramLoic Blot2017-06-19
| | | | We already have the device param as class member
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * 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
* C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
* C++11 patchset 6: forbid object copy using assigment/copy function deleters ↵Loïc Blot2017-06-10
| | | | | | | (#5945) C++11 implement function deleting, it's generally used to prevent some object copy In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place
* Have the server send the player list to the client (#5924)red-0012017-06-08
| | | | | * Have the server send the player list to the client Currently the client generates the player list based on the Client active object list, the issue with this is that we can't be sure all player active objects will be sent to the client, so this could result in players showing up when someone run `/status` but auto complete not working with their nick and CSM not being aware of the player
* [CSM] Add function to get player privileges (#5933)red-0012017-06-07
| | | | | | * [CSM] Add function to get player privileges + move related help functions to common * Added @Zeno- const
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
| | | | * Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* [CSM] Add send_chat_message and run_server_chatcommand API functions (#5747)Pierre-Adrien Langrognet2017-05-21
| | | | | | | | | | | | * [CSM] Add send_chat_message and run_server_chatcommand API functions * Add client-side chat message rate limiting * Limit out chat queue size * [CSM] Add minetest.clear_out_chat_queue API function and .clear_chat_queue chatcommand * Last fixes/cleanups before merge
* Various code cleanup & little performance improvement on HTTP download (#5772)Loïc Blot2017-05-20
| | | | | | * Disable or remove unused enum members/functions * Tiny code style fixes * Make some functions const * Replace ClientMediaDownloader std::unordered_map with std::map
* Add function to get server info.red-0012017-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).
* Sound API: Add fading soundsBrandon2017-05-03
|
* Add clouds APIBen Deutsch2017-04-30
|
* Client & ClientEnvirnment: don't create fake events (#5676)Loïc Blot2017-04-29
| | | | | | | Instead of create fake events on the stack on each loop call (Game::run), verify is queue is empty or not and handle event directly if there is. This prevents fake ClientEvent creation & memory allocations Same fix is also applied on ClientEnvironment, & rename getClientEvent to getClientEnvEvent to match ClientEnvEvent object
* [CSM] add screenshot api lua (#5674)Vincent Glize2017-04-29
| | | | * [CSM] add screenshot api lua
* Fix #5655 (#5658)red-0012017-04-26
| | | | Client: Don't send `TOSERVER_RECEIVED_MEDIA` since it's not used anymore Server: Handle `TOSERVER_RECEIVED_MEDIA` using `Server::handleCommand_Deprecated`
* 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
* Network:Remove old opcodes and fix documentation. (#5573)red-0012017-04-22
|
* Fix various variables passed by copy instead of const ref (#5610)Loïc Blot2017-04-19
| | | Pointed by cppcheck
* MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock ↵Perttu Ahola2017-04-17
| | | | | | | | | | | | | | | | | | | | | copying done in the main thread Cache size is configurable by the meshgen_block_cache_size (default 20 MB). New profiler stats: - MeshUpdateQueue MapBlock cache hit % - MeshUpdateQueue MapBlock cache size kB Removes one type of stutter that was seen on the client when received MapBlocks were being handled. (the "MeshMakeData::fill" stutter) Kind of related to at least #5239 Originally preceded by these commits, now includes them: - Move the mesh generator thread into src/mesh_generator_thread.{cpp,h} - mesh_generator_thread.cpp: Update code style - MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits. - MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
* [CSM] Add function and chat command to disconnect from server. (#5487)red-0012017-04-01
|
* Fix mismatch struct/class for GameUIFlagsLoic Blot2017-03-26
|
* Add mesh generation delaynumber Zero2017-03-26
|
* Refactor Game class (part 2) (#5422)Loïc Blot2017-03-19
| | | | | | | | | | | | | | * showPauseMenu is now part of game * remove many flags parameters passed to game functions, use the member. * rename VolatileRunFlags to GameUIFlags (this will permit to share structure with client and CSM * updatePointedThing: remove pointer ref, we already have the pointer in rundata * move some attributes outside of VolatileRunFlags after renaming, to game class * rename statustext to m_statustext * make some const variables static * All those changes permit to reduce a little bit function class cost and will permit to interface CSM with some interesting Game flags * Expose GameUIFlags to client * Client now have GameUIFlags parameter and setters for other classes * Fix minimap show/hide in Lua because we now have access to the real flag
* [CSM] Fix minimap problems (#5405)Loïc Blot2017-03-17
| | | This fixes issue #5404
* [CSM] Add minimap API modifiers (#5399)Loïc Blot2017-03-16
| | | | | | | | * Rename Mapper (too generic) to Minimap * Add lua functions to get/set position, angle, mode for minimap * Client: rename m_mapper to m_minimap * Add minimap to core.ui namespace (core.ui.minimap) * Add various functions to manage minimap (show, hide, toggle_shape) * Cleanup trivial declaration in client