| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Before, time progressed wrongly. This was due to a mistake in how m_time_of_day_f was calculated,
and a regression of the last two commits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Atomic implementation was only partially correct, and was very complex.
Use locks for sake of simplicity, following KISS principle.
Only remaining atomic operation use is time of day speed, because that
really is only read + written.
Also fixes a bug with m_time_conversion_skew only being decremented, never
incremented (Regresion from previous commit).
atomic.h changes:
* Add GenericAtomic<T> class for non-integral types like floats.
* Remove some last remainders from atomic.h of the volatile use.
|
|
|
|
|
|
|
|
| |
It isn't possible to use atomic operations for floats, so don't use them there.
Having a lock is good out of other reasons too, because this way the float time
and the integer time both match, and can't get different values in a race,
e.g. when two setTimeofDay() get executed simultaneously.
|
|
|
|
|
|
|
|
| |
-> Put access to time variables under the time lock.
-> Merge both time locks, there is no point to have two locks.
-> Fix the lock being released too early in Environment::setTimeOfDay
-> Add serverside getter so that you don't have to get
the environment if you only have the server
|
|
|
|
|
| |
Default is true for backwards compatibility
Update lua_api.txt
|
|
|
|
| |
These names are reserved for the compiler/library implementations.
|
|
|
|
| |
Remove DTIME macro and its uses, too
|
|
|
|
|
|
| |
Why doing things simple ? Use pointer instead of strings to save players and remove them.
Saving players by name does a lookup to find pointer we already have ! Idem with removePlayer
Also remove unused removePlayer(peer_id), it's never called
|
|
|
|
|
| |
Use std::queue instead of std::set, we don't need such a heavy container.
Don't convert position to int to convert it back to float in the next function.
|
|
|
|
|
| |
Borders have to be converted into BS format in order to be accurately comparable to
object positions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
| |
always evaluate to true.
|
|
|
|
|
|
| |
Enable the server to request the client to reconnect.
This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
|
| |
|
|
|
|
| |
stack exception
|
|
|
|
| |
Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
| |
This improves performance of MapBlock::raiseModified by a factor of 6.
Also, clean up mapblock.h a bit and inline small functions.
|
|
|
|
| |
but not rename the container. Approved-By est31
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
std::list. Also rename to m_active_object_messages_queue
|
|
|
|
|
| |
We are only iterating sequentially, we don't need a set here
Also use a vector reference instead of a copy
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Also fix a memory leak
Fix overloaded virtual warning in Player::move()
Remove some trailing whitespace
|
| |
|
|
|
|
| |
E.g. spawning or teleporting into lava to become invinsible
|
| |
|
|
|
|
| |
NDEBUG is defined), replace those usages with persistent alternatives
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
request_media, Server::getModNames, Environment::m_simple_objects.
* Also remove unused Server::m_modspaths
|
| |
|
|
|
|
| |
MutexedMap::getValues()
|
|
|
|
|
|
| |
std::list to std::vector
* Also remove dead code Map::unloadUnusedData which is dead since a long time
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
and ActiveBlockList::update
This improve looping performances.
|
|
|
|
|
|
| |
ServerMap::listAllLoadedBlocks and their database backends.
This adds a speedup on database migration and /clearobjects command
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
| |
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`.
|