| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
This used to return "/foo" for "../foo" when it should return the enpty
string (i.e., error removing all relative components).
|
|
|
|
| |
(was broken by e4ee6548afd01040046ee3780d0fbb121d141251)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO
* Move breath to PlayerSAO & LocalPlayer
* Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO
* Migrate m_yaw from Player to LocalPlayer for client
* Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it
* Move pitch to LocalPlayer & PlayerSAO
* Move m_position from Player to LocalPlayer
* Move camera_barely_in_ceiling to LocalPlayer as it's used only there
* use PlayerSAO::m_base_position for Server side positions
* remove a unused variable
* ServerActiveObject::setPos now uses const ref
* use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded
* Move hp from Player to LocalPlayer
* Move m_hp from LuaEntitySAO to UnitSAO
* Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the 'flat' and 'trees' flags were moved into mgv6_spflags they
were left in mg_flags in an attempt to support old mgv6 worlds. However
their appearence in mg_flags causes confusion, also, later, old-world
support was found to be broken for mgv6 worlds with 'notrees'.
This commit cleans up the mess and comes a month after a thread warning
of the change, and explaining the required action, was posted in the
news subforum. Only old mgv6 worlds with 'flat' or 'notrees' are
affected, a small minority of worlds, the required action being
correctly setting these flags in mgv6_spflags.
Disable a section of the 'map settings manager' unit test which is to
be changed as it is causing problems for pull requests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The "testStartStopWait" unit test is unreliably failing on mac,
for some time already. See bug #3786.
Having the unittest fail unreliably doesn't help anybody but mostly
inhibits the main feature of travis builds: to test PRs for regressions.
Therefore, disable the specific unit test for until bug #3786
is fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
instead of the EmergeManager.
- New Script API functions added:
core.get_mapgen_setting
core.get_mapgen_setting_noiseparams,
core.set_mapgen_setting, and
core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
|
|
|
|
|
|
| |
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Non const references cause a lot of confusion with behaviour of code,
and are disallowed by minetest style guide.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a chat console the server owner can use for administration
or to talk with players.
It runs in its own thread, which makes the user interface immune to
the server's lag, behaving just like a client, except timeout.
As it uses the same console code as the f10 console, things like nick
completion or a scroll buffer basically come for free.
The terminal itself is written in a general way so that adding a
client version later on is just about implementing an interface.
Fatal errors are printed after the console exists and the ncurses
terminal buffer gets cleaned up with endwin(), so that the error still
remains visible.
The server owner can chose their username their entered text will
have in chat and where players can send PMs to.
Once the username is secured with a password to prevent anybody to
take over the server, the owner can execute admin tasks over the
console.
This change includes a contribution by @kahrl who has improved ncurses
library detection.
|
|
|
|
| |
abort() doesn't benefit from the high level abstractions from FATAL_ERROR.
|
|
|
|
|
|
| |
- Fix thread name reset on start()
- Fully reset thread state on kill()
- Add unittests to check for correct object states under various circumstances
|
| |
|
|
|
|
| |
These names are reserved for the compiler/library implementations.
|
|
|
|
|
|
|
|
|
| |
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, this lua code led to a crash:
local pcg = PcgRandom(42)
local value = pcg:next()
This was because if you called s32 PcgRandom::range(min, max) with the
minimum and maximum possible values for s32 integers (which the lua
binding code did), u32 PcgRandom::range(bound) got called with 0 as the
bound. The bound however is one above the maximum value, so 0 is a "special"
value to pass to this function. This commit fixes the lua crash by
assigning the RNG's full range to the bound 0, which is also fits to the
"maximum is bound - 1" principle, as (u32)-1 is the maximum value in the
u32 range.
|
|
|
|
|
|
|
|
|
| |
Multiplying by a factor of 1/1000.f (rather than dividing by 1000.f) directly
introduces an error of 1 ULP. With this patch, an exact comparison of a
floating point literal with the deserialized F1000 form representing it is now
guaranteed to be successful.
In addition, the maxmium and minimum safely representible floating point
numbers are now well-defined as constants.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add serializeHexString()
Clean up util/serialize.cpp
|
|
|
|
|
| |
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
|
|
|
|
| |
Also fix UTF-8 inner byte bounds and make unittest for case this fixes.
|
|
|
|
|
|
| |
Also count multibyte sequences as "one" character.
Adds unittest for the bug reporter's case.
Fixes #2796.
|
| |
|
| |
|
|
|
|
| |
warnings
|
| |
|
| |
|
|
|
|
|
| |
Improve schematic file-saving interface
Add ability to create temporary test files
|
|
|
|
| |
This simplifies NodeResolver logic and makes some interfaces cleaner.
|
| |
|
|
|
|
|
|
| |
- Add ability to explicitly reset NodeResolve state (useful for unittesting)
- Remove non-essential NodeResolve methods modifying state from INodeDefManager
- Add const qualifier to NodeDefManager and ContentFeatures serialize
|
|
|
|
|
|
| |
Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
|
| |
|
| |
|
|
|
|
|
| |
-> Round negative numbers correctly CMakeLists.txt
-> Link Json with the static run-time library
|
|
|
|
|
|
| |
Make sure to include random unittests in android builds, too
Use SWAP() macro
Ensure that negative ranges are tested as well in random unittests
|