aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
AgeCommit message (Collapse)Author
2015-09-15Disallow placing entities outside safe boundariesest31
Entity positions are serialized as F1000. Disallow placing entities outside safe borders with the minetest.add_entity call. Note that this patch only enforces those boundaries for placing entities, moving entities that move outside boundaries aren't affected. Thanks to @nanepiwo for pointing this out.
2015-09-08Change m_client_event_queue's type to std::queueLoic Blot
As indicated in its name, m_client_event_queue should be a queue. Change std::list to std::queue to improve the queue's performance.
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-08-16SEnv: Remove static_exists from ActiveObjects in deleted blockskwolekr
2015-08-01src/environment.cpp: Fix NULL pointer dereferenceBřetislav Štec
2015-07-24Remove some old dead code. Fix some Clang warnings in SRP (ng->N... willLoic Blot
always evaluate to true.
2015-07-23Optional reconnect functionalityest31
Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2015-07-17Server kicks: make messages configurable, cache wstringest31
2015-07-16Kick players when shutting down server and there is a crash due to a Lua ↵nerzhul
stack exception
2015-07-13Remove raw message output on AOM deserialization failurekwolekr
Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
2015-06-20Generic CAO cleanups and renames for clarificationest31
* Use enum for GENERIC_CMD_* * Rename m_attachements to attachement_parent_ids (public member and clearer name) * Rename GENERIC_CMD_SET_ATTACHMENT to GENERIC_CMD_ATTACH_TO * USHRT_MAX + 1 buffer sizes to prevent overflows as @kahrl suggested * Remove unneccessary m_id from GenericCAO (shadowing protected superclass member for no reason) as @kahrl suggested
2015-06-20Make attached objects visible in 3rd person viewest31
2015-05-17Record MapBlock modification reasons as flags instead of stringskwolekr
This improves performance of MapBlock::raiseModified by a factor of 6. Also, clean up mapblock.h a bit and inline small functions.
2015-04-22Re-apply 972d17baea81ffe6d508b291ef97207a4822e1da...nerzhul
but not rename the container. Approved-By est31
2015-04-21Revert "m_active_object_messages is used like a queue. Use std::queue ↵kwolekr
instead of std::list. Also rename to m_active_object_messages_queue" This reverts commit 972d17baea81ffe6d508b291ef97207a4822e1da. The commit being reverted was unauthorized. There had been no discussion, review, or sign-off prior to submittal to upstream.
2015-04-21m_active_object_messages is used like a queue. Use std::queue instead of ↵Loic Blot
std::list. Also rename to m_active_object_messages_queue
2015-04-16Use std::vector instead of std::set for Environment::getObjectsInsideRadiusLoic Blot
We are only iterating sequentially, we don't need a set here Also use a vector reference instead of a copy
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-31Fix usage of destroyed mutexkwolekr
Also fix a memory leak Fix overloaded virtual warning in Player::move() Remove some trailing whitespace
2015-03-17Minor bug fix (lag between damage flash and hearts updating)Craig Robbins
2015-03-17Fix various damage related bugs (client-side)Craig Robbins
E.g. spawning or teleporting into lava to become invinsible
2015-03-13Use the new Player::isDead function when it's the caseLoic Blot
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-05Fix issue #2441: crash on respawn, since a conversion std::list to ↵Loic Blot
std::vector on Environment.cpp * Also change some std::list to std::vector for ClientMap::renderMap * Remove disabled code in ClientMap::renderMap, disabled since a long time
2015-03-05Performance improvement: Use std::list instead of std::vector for ↵Loic Blot
request_media, Server::getModNames, Environment::m_simple_objects. * Also remove unused Server::m_modspaths
2015-03-05Remove Queue class which uses std::list and use native std::queueLoic Blot
2015-03-04Use std::vector instead of std::list in StaticObjectList and ↵Loic Blot
MutexedMap::getValues()
2015-03-04ABMHandler and player_collisions use sequential read/write. Switch from ↵Loic Blot
std::list to std::vector * Also remove dead code Map::unloadUnusedData which is dead since a long time
2015-03-04ASyncRunStep doesn't need to lock when do setTimeOfDaySpeed.Loic Blot
* setTimeOfDaySpeed already lock a mutex when modify the value, we don't need to lock all environment. * add a fine grain lock for getTimeOfDay and setTimeOfDay to solve environment multithread modifications on this value
2015-02-17Change many useless std::list into Environment class (m_players), ABMHandler ↵Loic Blot
and ActiveBlockList::update This improve looping performances.
2015-02-17Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ↵Loic Blot
ServerMap::listAllLoadedBlocks and their database backends. This adds a speedup on database migration and /clearobjects command
2015-02-17SAO: re-add old ActiveObjectTypes for a future migration layerLoic Blot
2015-02-05Fix dying of lava causes repeated death This is a bugfix for issue #81gregorycu
2014-12-12Use std::string::empty() instead of size() where applicableAnton
2014-12-07Performance of main client loop up to 2x faster In places, up to 3 times fasterCraig Robbins
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
2014-11-14Remove most exceptions from getNode() (and variants)Craig Robbins
2014-11-08Implement WieldMeshSceneNode which improves wield mesh renderingKahrl
- Don't create and cache an extruded mesh for every (non-node) item. Instead use a single one per image resolution. - For cubic nodes reuse a single wield mesh too - Improve lighting of the wielded item - Increase far value of wield mesh scene camera, fixes #1770 - Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08Replace setting unlimited_player_transfer_distance with player_transfer_distanceSmallJoker
2014-10-23Remove remenants of mob codePavel Puchkin
Since minetest has no mobs within the core anymore, I suppose these settings and code should go. Any mod that uses `minetest.setting_getbool` will work with no problem since the default return value is `false`.
2014-10-01Make players check inventory modification properlyShadowNinja
2014-10-01Simplify player modification checksShadowNinja
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit
2014-09-01Update Mapgen VoxelManipulator on buffer invalidationkwolekr
2014-06-29Make player files saving againSmallJoker
2014-06-23Store the maximum player file tries in a constantShadowNinja
2014-06-23Only try to load from possible player filesShadowNinja
2014-06-23Only keep players loaded while they're connectedShadowNinja
2014-06-23Fix race condition on accessing m_time_of_day_speed causing day night race ↵sapier
on some architectures
2014-06-23Speedup attachement handling by replacing vector search by direct array ↵sapier
access and secondary child lookup vector