Merge branch 'stable-4.0' into stable-4.0-next, sync float limits
* fix commits 00114e9c23 and 8afa292ed8 and c63593ec39, merge the solution with stable-4.0-next to define final release soon
This commit is contained in:
commit
db479a9e97
@ -2276,14 +2276,13 @@ Helper functions
|
|||||||
avg_jitter = 0.03, -- average packet time jitter
|
avg_jitter = 0.03, -- average packet time jitter
|
||||||
connection_uptime = 200, -- seconds since client connected
|
connection_uptime = 200, -- seconds since client connected
|
||||||
protocol_version = 32, -- protocol version used by client
|
protocol_version = 32, -- protocol version used by client
|
||||||
-- following information is available on debug build only!!!
|
-- next info is only available in VenenuX minetest versions minenux
|
||||||
-- DO NOT USE IN MODS
|
ser_vers = 26, -- serialization version used by client
|
||||||
--ser_vers = 26, -- serialization version used by client
|
major = 0, -- major version number
|
||||||
--major = 0, -- major version number
|
minor = 4, -- minor version number
|
||||||
--minor = 4, -- minor version number
|
patch = 10, -- patch version number
|
||||||
--patch = 10, -- patch version number
|
vers_string = "0.4.9-git", -- full version string
|
||||||
--vers_string = "0.4.9-git", -- full version string
|
state = "Active" -- current client state
|
||||||
--state = "Active" -- current client state
|
|
||||||
}
|
}
|
||||||
* `minetest.mkdir(path)`: returns success.
|
* `minetest.mkdir(path)`: returns success.
|
||||||
* Creates a directory specified by `path`, creating parent directories
|
* Creates a directory specified by `path`, creating parent directories
|
||||||
|
@ -360,6 +360,7 @@ public:
|
|||||||
u8 getMajor() const { return m_version_major; }
|
u8 getMajor() const { return m_version_major; }
|
||||||
u8 getMinor() const { return m_version_minor; }
|
u8 getMinor() const { return m_version_minor; }
|
||||||
u8 getPatch() const { return m_version_patch; }
|
u8 getPatch() const { return m_version_patch; }
|
||||||
|
std::string getFull() const { return m_full_version; }
|
||||||
private:
|
private:
|
||||||
// Version is stored in here after INIT before INIT2
|
// Version is stored in here after INIT before INIT2
|
||||||
u8 m_pending_serialization_version;
|
u8 m_pending_serialization_version;
|
||||||
|
@ -28,7 +28,7 @@ extern "C" {
|
|||||||
#include "common/c_converter.h"
|
#include "common/c_converter.h"
|
||||||
#include "common/c_internal.h"
|
#include "common/c_internal.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#define CHECK_TYPE(index, name, type) do { \
|
#define CHECK_TYPE(index, name, type) do { \
|
||||||
int t = lua_type(L, (index)); \
|
int t = lua_type(L, (index)); \
|
||||||
@ -41,8 +41,8 @@ extern "C" {
|
|||||||
} while(0)
|
} while(0)
|
||||||
#define CHECK_POS_COORD(name) CHECK_TYPE(-1, "position coordinate '" name "'", LUA_TNUMBER)
|
#define CHECK_POS_COORD(name) CHECK_TYPE(-1, "position coordinate '" name "'", LUA_TNUMBER)
|
||||||
#define CHECK_FLOAT_RANGE(value, name) \
|
#define CHECK_FLOAT_RANGE(value, name) \
|
||||||
if (value < F1000_MIN || value > F1000_MAX) { \
|
if (value < F1000_MIN || value > F1000_MAX || std::isnan(value) || std::isinf(value) ) { \
|
||||||
warningstream << "Invalid float vector dimension range '" name "' " << \
|
warningstream << "Invalid float vector dimension range or null value given '" name "' " << \
|
||||||
"(expected " << F1000_MIN << " < " name " < " << F1000_MAX << \
|
"(expected " << F1000_MIN << " < " name " < " << F1000_MAX << \
|
||||||
" got " << value << "). restarted to max / min" << std::endl; \
|
" got " << value << "). restarted to max / min" << std::endl; \
|
||||||
if (value < F1000_MIN) \
|
if (value < F1000_MIN) \
|
||||||
|
@ -236,7 +236,6 @@ int ModApiServer::l_get_player_information(lua_State *L)
|
|||||||
lua_pushnumber(L, prot_vers);
|
lua_pushnumber(L, prot_vers);
|
||||||
lua_settable(L, table);
|
lua_settable(L, table);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
lua_pushstring(L,"serialization_version");
|
lua_pushstring(L,"serialization_version");
|
||||||
lua_pushnumber(L, ser_vers);
|
lua_pushnumber(L, ser_vers);
|
||||||
lua_settable(L, table);
|
lua_settable(L, table);
|
||||||
@ -260,7 +259,6 @@ int ModApiServer::l_get_player_information(lua_State *L)
|
|||||||
lua_pushstring(L,"state");
|
lua_pushstring(L,"state");
|
||||||
lua_pushstring(L,ClientInterface::state2Name(state).c_str());
|
lua_pushstring(L,ClientInterface::state2Name(state).c_str());
|
||||||
lua_settable(L, table);
|
lua_settable(L, table);
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef ERET
|
#undef ERET
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1429,7 +1429,7 @@ bool Server::getClientInfo(
|
|||||||
*major = client->getMajor();
|
*major = client->getMajor();
|
||||||
*minor = client->getMinor();
|
*minor = client->getMinor();
|
||||||
*patch = client->getPatch();
|
*patch = client->getPatch();
|
||||||
*vers_string = client->getPatch();
|
*vers_string = client->getFull();
|
||||||
|
|
||||||
m_clients.unlock();
|
m_clients.unlock();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user