| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new nodebox type "connected", and allow these nodes to
have optional nodeboxes that connect it to other connecting nodeboxes.
This is all done at scenedraw time in the client. The client will
inspect the surrounding nodes and if they are to be connected to,
it will draw the appropriate connecting nodeboxes to make those
connections.
In the node_box definition, we have to specify separate nodeboxes for
each valid connection. This allows us to make nodes that connect only
horizontally (the common case) by providing optional nodeboxes for +x,
-x, +z, -z directions. Or this allows us to make wires that can connect
up and down, by providing nodeboxes that connect it up and down (+y,
-y) as well.
The optional nodeboxes can be arrays. They are named "connect_top,
"connect_bottom", "connect_front", "connect_left", "connect_back" and
"connect_right". Here, "front" means the south facing side of the node
that has facedir = 0.
Additionally, a "fixed" nodebox list present will always be drawn,
so one can make a central post, for instance. This "fixed" nodebox
can be omitted, or it can be an array of nodeboxes.
Collision boxes are also updated in exactly the same fashion, which
allows you to walk over the upper extremities of the individual
node boxes, or stand really close to them. You can also walk up
node noxes that are small in height, all as expected, and unlike the
NDT_FENCELIKE nodes.
I've posted a screenshot demonstrating the flexibility at
http://i.imgur.com/zaJq8jo.png
In the screenshot, all connecting nodes are of this new subtype.
Transparent textures render incorrectly, Which I don't think is
related to this text, as other nodeboxes also have issues with this.
A protocol bump is performed in order to be able to send older clients
a nodeblock that is usable for them. In order to avoid abuse of users
we send older clients a "full-size" node, so that it's impossible for
them to try and walk through a fence or wall that's created in this
fashion. This was tested with a pre-bump client connected against a
server running the new protocol.
These nodes connect to other nodes, and you can select which ones
those are by specifying node names (or group names) in the
connects_to string array:
connects_to = { "group:fence", "default:wood" }
By default, nodes do not connect to anything, allowing you to create
nodes that always have to be paired in order to connect. lua_api.txt
is updated to reflect the extension to the node_box API.
Example lua code needed to generate these nodes can be found here:
https://gist.github.com/sofar/b381c8c192c8e53e6062
|
|
|
|
|
|
| |
* Replace string by-val passing with const reference
* Fix code style
* Remove redundant `int table` definition and indentation level
|
| |
|
|
|
|
|
| |
Throwing a LuaError calls destructors as it propagates up the stack,
wheres lua_error just executes a longjmp.
|
|
|
|
| |
This function could be used to steal insecure environments from trusted mods.
|
|
|
|
| |
Previous commits broke it... :(
|
| |
|
| |
|
|
|
|
|
|
|
| |
For several years now, the lua script lock has been completely broken.
This commit fixes the main issue (creation of a temporary rather than
scoped object), and fixes a subsequent deadlock issue caused by
nested script API calls by adding support for recursive mutexes.
|
|
|
|
|
|
|
|
| |
Previously, the server called FATAL_ERROR when a Lua error occured.
This caused a (mostly useless) core dump.
The server now simply throws an exception, which is caught and printed before
exiting with a non-zero return value.
This also fixes a number of instances where errors were logged multiple times.
|
|
|
|
| |
abort() doesn't benefit from the high level abstractions from FATAL_ERROR.
|
|
|
|
|
| |
Default is true for backwards compatibility
Update lua_api.txt
|
|
|
|
|
|
|
|
|
| |
This might break some mods, but it is important for all uses of the param2 to
be documented.
This doesn't need a serialisation version or network protocol version change,
as old clients will still work on new servers, and it is bearable to have
new clients getting non rotated plants on old servers.
|
|
|
|
|
| |
Fixes "double fault" / "error in error handling" messages
(issue #1423) and instead shows a complete backtrace.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
Also misc. minor cleanups
|
| |
|
|
|
|
|
|
| |
Enable the server to request the client to reconnect.
This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
According to doc, dofile() raises an error when parsing failed due to syntax errors.
Fixes #2775
|
|
|
|
|
| |
If you run minetest with valgrind, you'll quickly notice uninitialized jump
depend error messages that point to s_base.cpp:131. This commit fixes those.
|
|
|
|
| |
Also fix a startup error caused by s_security.cpp
|
|
|
|
|
|
| |
Also, clean up surrounding code style
Replace by-value parameter passing with const refs when possible
Fix post-increment of iterators
|
|
|
|
| |
Due to compatibility concerns, this is temporarily disabled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Combine client and server man pages.
* Update unit test options and available databases in man page.
* Add `--worldname` to man page.
* Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`.
* Disable server build by default on all operating systems.
* Make `ENABLE_FREETYPE` not fail if FreeType isn't found.
* Enable LevelDB, Redis, and FreeType detection by default.
* Remove the `VERSION_PATCH_ORIG` hack.
* Add option to search for and use system JSONCPP.
* Remove broken LuaJIT version detection.
* Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`.
* Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`.
* Clean up style of CMake files.
|
|
|
|
| |
NDEBUG is defined), replace those usages with persistent alternatives
|
| |
|
|
|
|
|
| |
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add DPI support for statbar
Move heart+bubble bar to Lua HUD
Add statbar size (based upon an idea by blue42u)
Add support for customizing breath and statbar
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes a number of changes:
* Remove the dependency on marshal by using string.dump and loadstring.
* Use lua_tolstring rather than having Lua functions pass string lengths to C++.
* Move lua_api/l_async_events.* to cpp_api/s_async.*, where it belongs.
* Make AsyncWorkerThread a child of ScriptApiBase, this removes some duplicate functionality.
* Don't wait for async threads to shut down. (Is this safe? Might result in corruption if the thread is writing to a file.)
* Pop more unused items from the stack
* Code style fixes
* Other misc changes
|
| |
|
| |
|
| |
|
| |
|