summaryrefslogtreecommitdiff
path: root/src/server.cpp
Commit message (Collapse)AuthorAge
* Run detach callbacks on player leaveSmallJoker2018-05-12
| | | | Correct docs regarding non-nil detaching children
* Fix builtin inventory list crash when size = 0 (#7297)SmallJoker2018-05-05
|
* Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker2018-04-30
| | | * Allow right-clicking on attached LuaEntities
* Move ASCII art to std::cerr, to remove it from logsrubenwardy2018-04-23
|
* Add online content repositoryrubenwardy2018-04-19
| | | | Replaces mods and texture pack tabs with a single content tab
* Fix 5 issues reported by PVS studioLoic Blot2018-04-04
| | | | | | | | * src/sky.cpp 146 warn V519 The 'suncolor_f.r' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 142, 146. * src/sky.cpp 147 warn V519 The 'suncolor_f.g' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 143, 147. * src/sky.cpp 148 warn V519 The 'suncolor_f.b' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 144, 148. * src/threading/thread.cpp 63 err V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_thread_obj. * src/server.cpp 3243 err V595 The 'log' pointer was utilized before it was verified against nullptr. Check lines: 3243, 3258.
* Client eventmanager refactor (#7179)Loïc Blot2018-03-30
| | | | | | | | | | | | | | | | | | | | | * Drop EventManager from GameDef & do some client cleanups * EventManager is only used by Client. Don't expose it on Server & GameDef for nothing * Drop Client::event() in favor of direct calls to getEventManager * Cleanup some event put from new + put to put(new) * MtEvent: add Type(u8) enum * This will enhance event performance & ensure stricter type * Drop MtEvent::checkIs (unused) * clang-tidy reported fixes * Code style * Move event_manager.h to the client directory as it's only used by client Add EventManager unittests + switch to unordered_map as order is not important here Drop a unused function
* Add reasons to on_dieplayer and on_hpchangeAndrew Ward2018-03-28
|
* Add formspec theming using prepended stringsAndrew Ward2018-03-28
|
* Minetest ASCII art: Move from actionstream to rawstreamparamat2018-03-21
|
* Drop Server::m_enable_rollback_recording it's only used in server constructorLoic Blot2018-03-16
|
* ServerEnvironment::loadDefaultMeta: Loading default meta is only possible ↵Loic Blot2018-03-16
| | | | for ServerEnv itself
* Forgot to remove obsolete Server::m_modsLoic Blot2018-03-16
|
* Server: delegate mod management & config to ServerModConfiguration (#7131)Loïc Blot2018-03-16
| | | | | | | | * Server: delegate mod management & config to ServerModConfiguration (rename it to ServerModManager) * Use c++11 range based loops * Add unittests + experimental/default mod as a test case to permit testing mod loading in future tests
* Drop less performant Server::setBlockNotSent for ↵Loic Blot2018-03-09
| | | | ClientInterface::markBlockposAsNotSent
* Cleanup & bugfixLoic Blot2018-03-08
| | | | | | | | * ObjectRef::set_local_animation: fix wrong lua return (should push a boolean, currently returns nil) * ObjectRef::set_eye_offset: fix wrong lua return (should push a boolean, currently returns nil) * Fix various Server functions which depends on RemotePlayer objet and return true/false when player object is nil whereas it's a caller implementation error. Change those bool functions to void and add sanitize_check call instead. Current callers are always checking player object validity * Optimize Server::setClouds : use CloudParams object ref instead of attribute deserialization from structure & perform RemotePlayer::setCloudParams directly in server class like many other calls * Optimize Server::SendCloudParams: use CloudParams object ref instead of deserialized attributes
* Cleanup: drop Server::hudGetHotbarSelectedImage()Loic Blot2018-03-08
| | | | Call directly accessible RemotePlayer::getHotbarSelectedImage() from server api
* Cleanup: drop Server::hudGetHotbarImage()Loic Blot2018-03-08
| | | | Call directly accessible RemotePlayer::getHotbarImage() from server api & make it const ref
* Cleanup: drop Server::hudGetHotbarItemcount()Loic Blot2018-03-08
| | | | Call directly accessible RemotePlayer::getHotbarItemcount() from server api
* Mitigate formspec exploits by verifying that the formspec was shown to the ↵red-0012018-02-18
| | | | | user by the server. (#6878) This doesn't check the fields in anyway whatsoever so it should only be seen as a way to mitigate exploits, a last line of defense to make it harder to exploit bugs in mods, not as a reason to not do all the usually checks.
* 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
* Load a texturepack from the 'textures' subfolder of a gamered-0012018-01-16
|
* Shut down mapgen threads before other shutdown tasks (#6689)raymoo2017-12-03
| | | | | | Solves some issues with ModStorage functionality in mapgen threads that occurred when mapgen threads continued to run after the main server thread had stopped. Also shuts down mapgen threads before shutdown callbacks are called.
* Load files from subfolders in texturepacksnumber Zero2017-11-17
| | | | Updated and rebased version of a PR by red-001
* Move files to subdirectories (#6599)Vitaliy2017-11-08
| | | | * Move files around
* 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
* Server: affect bind_addr on constructor instead of start() (#6474)Loïc Blot2017-09-28
| | | bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
* Fix some forgotten u16 -> session_t in ad7daf7b52348e1b71aa803be10de5b2134cba11Loic Blot2017-09-27
|
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
| | | | | | * 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
* 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
* Customizeable max breath for players (#6411)SmallJoker2017-09-15
| | | | * Customizeable maximal breath for players
* 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
* Server: Calculate maximal total block sends dynamically (#6393)SmallJoker2017-09-09
| | | The block sends per client is 1/2 when reaching the maximal player count.
* Remove DSTACK support (#6346)Loïc Blot2017-08-30
| | | 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.
* Network proto handlers/container fixes (#6334)Loïc Blot2017-08-29
| | | | | | | | | | * Fix HP transport + some double <-> float problems TOCLIENT_HP transport u16 hp as a u8, use u16 HP, this prevent HP over 255 to overflow across network * Fix more double/float problem in serverpackethandler & remove implicit struct type for TileAnimationParams * Fix connection unittests container
* Add clientside translations.Ekdohibs2017-08-24
|
* 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
* Respect object property hp_max field for players (#6287)SmallJoker2017-08-23
| | | | | | | | | | | * Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
* 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
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h
* server.cpp: unroll setting when sending mapblocks (#6265)Loïc Blot2017-08-18
| | | | | | | | * server.cpp: unroll setting when sending mapblocks * Improve a little bit performance when sending mapblocks massively * Use a range based for * Code style fixes
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* server.cpp: code modernizationLoic Blot2017-08-15
| | | | | | | * Use more for range based loops * Simplify some tests * Code style fixes * connection.h: better PeerChange constructor instead of creating uninitalized object and then affect variables
* Various server.cpp cleanupsLoic Blot2017-08-14
| | | | | | | * Modernize many for loops * Use constness on many loops * use empty function on many strings tests * various code style fixes
* Server::AsyncRunStep + Server::sendAddNode: modernize codeLoic Blot2017-08-14
| | | | | | | | * Use various modern for loops * Make some loop iterator constants, whereas there weren't * Use empty on some size() > 0 tests * Various little codestyle fixes * Fix an hidden scope variable in Server::SendBlockNoLock
* Remove one unused variable in Server::Receive functionLoic Blot2017-07-27
|
* [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
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
|
* Remove legacy content_abm.{cpp,h}Loïc Blot2017-06-14
|