Commit Graph

241 Commits

Author SHA1 Message Date
nerzhul eec01bc2fa Re-apply 972d17baea81ffe6d508b291ef97207a4822e1da...
but not rename the container. Approved-By est31
2015-04-22 11:47:22 +02:00
kwolekr e0eec201a1 Revert "m_active_object_messages is used like a queue. Use std::queue instead of std::list. Also rename to m_active_object_messages_queue"
This reverts commit 972d17baea.
The commit being reverted was unauthorized.  There had been no discussion,
review, or sign-off prior to submittal to upstream.
2015-04-21 18:12:01 -04:00
Loic Blot 972d17baea m_active_object_messages is used like a queue. Use std::queue instead of std::list. Also rename to m_active_object_messages_queue 2015-04-21 23:28:13 +02:00
Loic Blot 0c634a9719 Use std::vector instead of std::set for Environment::getObjectsInsideRadius
We are only iterating sequentially, we don't need a set here
Also use a vector reference instead of a copy
2015-04-16 18:37:29 +02:00
Craig Robbins 9527984dbc Move globals from main.cpp to more sane locations
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-04-01 23:04:25 +10:00
kwolekr b4247dff2e Fix usage of destroyed mutex
Also fix a memory leak
Fix overloaded virtual warning in Player::move()
Remove some trailing whitespace
2015-03-31 23:50:38 -04:00
Craig Robbins dbe5a446c3 Minor bug fix (lag between damage flash and hearts updating) 2015-03-17 17:39:59 +10:00
Craig Robbins c552d293fa Fix various damage related bugs (client-side)
E.g. spawning or teleporting into lava to become invinsible
2015-03-17 17:08:00 +10:00
Loic Blot 4e63c977c7 Use the new Player::isDead function when it's the case 2015-03-13 08:57:58 +01:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Loic Blot 9749d9fee6 Fix issue #2441: crash on respawn, since a conversion std::list to 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-05 15:36:20 +01:00
Loic Blot 365e4ae0fa Performance improvement: Use std::list instead of std::vector for request_media, Server::getModNames, Environment::m_simple_objects.
* Also remove unused Server::m_modspaths
2015-03-05 10:44:48 +01:00
Loic Blot b214cde5b4 Remove Queue class which uses std::list and use native std::queue 2015-03-05 16:49:51 +10:00
Loic Blot cd684497c2 Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues() 2015-03-04 17:22:37 +01:00
Loic Blot 06f328207f ABMHandler and player_collisions use sequential read/write. Switch from std::list to std::vector
* Also remove dead code Map::unloadUnusedData which is dead since a long time
2015-03-04 17:02:36 +01:00
Loic Blot 7f8f9785d7 ASyncRunStep doesn't need to lock when do setTimeOfDaySpeed.
* 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-03-04 11:46:31 +01:00
Loic Blot 2079462e62 Change many useless std::list into Environment class (m_players), ABMHandler and ActiveBlockList::update
This improve looping performances.
2015-02-17 16:50:03 +01:00
Loic Blot 718bcafd51 Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap::listAllLoadedBlocks and their database backends.
This adds a speedup on database migration and /clearobjects command
2015-02-17 14:35:44 +01:00
Loic Blot c58d49977d SAO: re-add old ActiveObjectTypes for a future migration layer 2015-02-17 11:37:55 +01:00
gregorycu 5e075c3344 Fix dying of lava causes repeated death This is a bugfix for issue #81 2015-02-05 17:32:35 +10:00
Anton 10e0cf8b2c Use std::string::empty() instead of size() where applicable 2014-12-12 15:16:24 -05:00
Craig Robbins 2b119e1e19 Performance of main client loop up to 2x faster In places, up to 3 times faster
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-12-07 00:51:01 +10:00
Craig Robbins 5b8855e83c Remove most exceptions from getNode() (and variants) 2014-11-14 18:05:34 +10:00
Kahrl 9b551d5cbc Implement WieldMeshSceneNode which improves wield mesh rendering
- 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-08 23:11:57 +01:00
SmallJoker c40e993ce4 Replace setting unlimited_player_transfer_distance with player_transfer_distance 2014-11-08 14:56:09 +01:00
Pavel Puchkin 73bf791fe1 Remove remenants of mob code
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-23 20:54:33 -04:00
ShadowNinja e9c9b66ae9 Make players check inventory modification properly 2014-10-01 18:44:36 -04:00
ShadowNinja cd0df0d5e7 Simplify player modification checks 2014-10-01 18:44:36 -04:00
ShadowNinja 6bc4cad0ed Split settings into seperate source and header files
This also cleans up settings a bit
2014-09-21 14:39:35 -04:00
kwolekr 9e4e7072da Update Mapgen VoxelManipulator on buffer invalidation 2014-09-01 15:12:22 -04:00
SmallJoker 3c5df42a17 Make player files saving again 2014-06-29 00:45:04 +02:00
ShadowNinja 089fc010ab Store the maximum player file tries in a constant 2014-06-23 15:55:47 -04:00
ShadowNinja e491f8cd48 Only try to load from possible player files 2014-06-23 15:45:59 -04:00
ShadowNinja 7e6db1b803 Only keep players loaded while they're connected 2014-06-23 15:45:59 -04:00
sapier f6fc39e69a Fix race condition on accessing m_time_of_day_speed causing day night race on some architectures 2014-06-23 00:26:57 +02:00
sapier 35ec3855f6 Speedup attachement handling by replacing vector search by direct array access and secondary child lookup vector 2014-06-23 00:13:41 +02:00
proller 0279f32db7 Remove liquid_finite and weather 2014-04-18 21:56:48 +04:00
Sfan5 118e2ae865 Fix all warnings reported by clang 2014-04-15 21:34:53 +02:00
Ciaran Gultnieks 564e11fc2f Fix merge mistake when rebasing for PR #1169 2014-03-24 19:56:36 +01:00
Selat 2bc2ce3bd1 Remove goto from Environment::removePlayer 2014-03-12 17:02:52 -04:00
Ciaran Gultnieks 0643cef09a Update ABM object counts when triggers add objects
Also fixes long-standing accuracy issue due to unknown wider
object count not being incremented.
2014-03-09 11:13:44 +01:00
Ciaran Gultnieks db98ef6b45 Stop wasting time in abm - performance improvement
Unless I'm mistaken, the chunk of code I'm moving there is potentially
executed hundreds of times inside the loop to get the exact same result
every time
2014-03-06 19:18:36 +01:00
Ciaran Gultnieks baee91bf78 Fix for unloaded but active block problem 2014-03-02 20:39:28 +01:00
kwolekr 89f7dc1efd ServerEnvironment: Remove direct dependency on EmergeManager 2014-02-09 16:36:30 -05:00
Perttu Ahola 6a3fa9df12 Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness 2014-02-01 18:38:21 +01:00
Ilya Zhuravlev a4c5f10ecf Fix some errors reported by clang static analyzer. 2014-01-13 03:29:12 +04:00
Novatux 84b94eb198 Add forceloading 2014-01-11 17:54:00 +01:00
stujones11 d9ef072305 Make line_of_sight return blocking node position 2013-12-12 16:11:00 -05:00
Novatux d879a539cd Add minetest.swap_node 2013-11-30 18:37:56 +01:00
Perttu Ahola 21789ccc5f Revert patch 58f036ad1 that causes object duplication (which tried to fix objects getting hidden from client) and fix the original problem correctly. This fixes the second distinct object duplication bug. 2013-11-17 14:46:01 -05:00