summaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
Commit message (Collapse)AuthorAge
* Force player save before kicking on player shutdown (#8157)Loïc Blot2019-02-03
|
* Fix some misspellings (#8104)Paul Ouellette2019-01-16
|
* Make sqlite3 default auth & player backends for new worlds (#8043)Loïc Blot2019-01-04
| | | | | | * Make sqlite3 default auth & player backends for new worlds Also notify about auth backend depreciation
* Player file directory must be only created when using file backend.Loïc Blot2019-01-04
| | | | Also ensure on each player save that the directory exists
* Add an activeobject manager to hold active objects (#7939)Loïc Blot2018-12-13
| | | | * Add an activeobject manager to hold active objects * Add unittests
* 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).
* Replace auth.txt with SQLite auth database (#7279)Ben Deutsch2018-08-05
| | | | * Replace auth.txt with SQLite auth database
* Add a MSVC / Windows compatible snprintf function (#7353)nOOb31672018-07-22
| | | Use sizeof where applicable for mt_snprintf
* Optimize ABM checks.Lars Hofhansl2018-07-21
| | | | | | | See #7555 Cache (up to 64) node types for each active block. Check this cache first to see whether any ABM needs to be triggered for a block.
* Revert 6587 - Optimize entity-entity collision (#7539)lhofhansl2018-07-08
|
* Add player:get_meta(), deprecate player attributes (#7202)rubenwardy2018-04-06
| | | | * Add player:get_meta(), deprecate player attributes
* Huge LBM lookup performance improvement on mapblock loading (#7195)Loïc Blot2018-04-04
| | | | * Huge LBM lookup performance improvement on mapblock loading
* Optimize entity-entity collision (#6587)Vitaliy2018-04-03
| | | | | | * Add IrrLicht type aliases * Add hash for IrrLicht vector * Add object map
* ServerEnvironment::loadDefaultMeta: Loading default meta is only possible ↵Loic Blot2018-03-16
| | | | for ServerEnv itself
* VoxelArea: add_{x,y,z,p} must be staticLoic Blot2018-03-09
| | | | | Fix some documentations issues Use getNodeNoCheck(v3s16, ...) in some cases instead of getNodeNoCheck(x, y, z, ...)
* ServerEnvironment & StaticObject cleanupsLoic Blot2018-03-09
| | | | | | * isFreeServerActiveObjectId is now part of ServerEnvironment * getFreeServerActiveObjectId is now part of ServerEnvironment * StaticObject constructor now take ServerActiveObject instead of type + string. This permits to remove a big string copy in some code parts
* SAO limits: Allow SAOs to exist outside the set 'mapgen limit'paramat2018-02-26
|
* 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
* Add minetest.bulk_set_node call + optimize Environment::set_node call (#6958)Loïc Blot2018-01-30
| | | | | | | | | | * Add minetest.bulk_set_node call + experimental mod unittest * Optimize set_node function to prevent triple lookup on contentfeatures Do only one lookup for old, and try to merge old and new lookup if node is same than previous node * Add benchmark function + optimize vector population to have real results
* Revert "Add an active object step time budget #6721"Lars Hofhansl2018-01-12
| | | | | This reverts commit 9c669016d1578a5c62f932c6ccb7a2b4b1e21f0a. See #6907
* Line_of_sight: Improve using VoxelLineIteratorDániel Juhász2017-12-26
| | | | | This commit rewrites line_of_sight with VoxelLineIterator. Stepsize is no longer needed, the results will be always accurate.
* Add an active object step time budget #6721Lars Hofhansl2017-12-06
| | | | This can be set via the active_object_interval option.
* Optionally extend the active object in a players camera direction.Lars Hofhansl2017-12-03
| | | | | | | | | See #6667 By setting active_object_send_range_blocks > active_block_range a server admin can allow clients to retrieve active objects futher out from the player at relatively low cost to the server (only objects in the players' view cone are considered).
* Clearobjects: Send progress messages to terminal using actionstreamparamat2017-11-24
| | | | | Change default mode to 'quick' as 'full' can lock up a server for a long time.
* 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
* 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
* ServerEnv: Clean up object lifecycle handling (#6414)sfan52017-09-15
| | | | * ServerEnv: Clean up object lifecycle handling
* Make INodeDefManager::getIds return a vector, not a setKahrl2017-09-12
|
* 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.
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
| | | | | | | | | | | | | * Code modernization: subfolders Modernize various code on subfolders client, network, script, threading, unittests, util * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Make connection.cpp readable in a pointed place + typo
* 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
* ServerEnvironment::step: modernize loopsLoic Blot2017-08-11
| | | | | | Use various ranged-based for loops in ServerEnvironment::step Also set ServerObject::getBasePosition const to be compliant ServerEnvironment::deleteParticleSpawner: use a const iterator
* Start off newly generated worlds early at sunrise, 5:15am (#6211)JRottm2017-08-05
| | | | | | | | | | Gives starting singleplayer games this subtle "dawn of a new world" feel. I would have set it even earlier (up to 4:45am), but I was worried that in some pre-existing games the player could be overwhelmed by hostile mobs right at the start, seriously changing gameplay. It's just the default, individual games should be able to override it, and for public servers it's irrelevant anyway, because only the first player to set foot in the world will notice, and that's usually the server admin.
* LBM: use range based for and fixed a loop variable overloading in applyLBMsLoic Blot2017-07-24
|
* LBM content mapping map doesn't need to be ordered, use std::unordered_mapLoic Blot2017-07-18
| | | | Also rename helper to lbm_map instead of container_map
* Expose getPointedThing to LuaDániel Juhász2017-07-07
| | | | | | This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
* Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot2017-06-18
|
* Use thread_local instead from some static settings (#5955)Loïc Blot2017-06-11
| | | | | thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places. Add thread_local to undersampling calculation too.
* (Re)spawn players within 'mapgen_limit'paramat2017-06-11
| | | | | | | | | | | | | Previously, findSpawnPos() did not take the 'mapgen_limit' setting into account, a small limit often resulted in a spawn out in the void. Use the recently added 'calcMapgenEdges()' to get max spawn range through a new mapgenParams function 'getSpawnRangeMax()'. Previously, when a player respawned into a world, 'objectpos_over_limit()' was used as a check, which was inaccurate. Use the recently added 'saoPosOverLimit()' to get exact mapgen edges. Also fix default value of 'm_sao_limit_min'.
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Enhance ABM performance a little bit by removing two std::set copy (#5815)Loïc Blot2017-05-25
| | | | | | | | | | * Enhance ABM performance a little bit by removing two std::set copy * ActiveBlockModifier::getTriggerContents now returns a const ref * ActiveBlockModifier::getRequiredNeighbors now returns a const ref * ActiveBlockModifier::getRequiredNeighbors is now purely virtual * Little code style fix
* Mainmenu: Fix issues while trying to enable all mods (#5770)SmallJoker2017-05-19
|
* Rename Scripting API files for consistencyShadowNinja2017-04-25
|
* 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
* [CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)Loïc Blot2017-03-17
| | | | | | * [CSM] Add core.get_timeofday & core.get_day_count env calls * [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near
* [CSM] Client side moddingLoic Blot2017-03-13
| | | | | | | | | | * rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
* Objectpos over limit: Avoid crash caused by sector over limitparamat2017-02-16
| | | | | | | | | | Reduce the object limit by mapblock size, to avoid objects being added just inside the map generation limit but in a block and sector that extend beyond the map generation limit. Change notification of 'objectpos over limit' from red in-chat ERROR to in-terminal only WARNING, since this will happen often using mob mods near the world's edge.
* Fix >5 year old PlayerSAO deletion bugsfan52017-02-15
| | | | | | | | | force_delete=true is usually set at shutdown in order to also remove PlayerSAOs, however when too many objects per block are detected force_delete is also set to true. This was intended only for the current loop iteration but obviously persisted to the next iterations thereby deleting all other remaining SAOs.