master #4

Merged
BRNSystems merged 3 commits from Mirrorlandia_minetest/minetest:master into master 2023-12-13 19:56:20 +01:00
4 changed files with 14 additions and 7 deletions
Showing only changes of commit a98200bb4c - Show all commits

@ -393,8 +393,8 @@ void Client::connect(Address address, bool is_local_server)
void Client::step(float dtime)
{
// Limit a bit
if (dtime > 2.0)
dtime = 2.0;
if (dtime > DTIME_LIMIT)
dtime = DTIME_LIMIT;
m_animation_time += dtime;
if(m_animation_time > 60.0)

@ -241,13 +241,13 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
/*
Calculate new velocity
*/
if (dtime > 0.5f) {
if (dtime > DTIME_LIMIT) {
if (!time_notification_done) {
time_notification_done = true;
infostream << "collisionMoveSimple: maximum step interval exceeded,"
warningstream << "collisionMoveSimple: maximum step interval exceeded,"
" lost movement details!"<<std::endl;
}
dtime = 0.5f;
dtime = DTIME_LIMIT;
} else {
time_notification_done = false;
}

@ -56,6 +56,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// Override for the previous one when distance of block is very low
#define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
/*
Client/Server
*/
// Limit maximum dtime in client/server step(...) and for collision detection
#define DTIME_LIMIT 2.5f
/*
Map-related things
*/

@ -577,8 +577,8 @@ void Server::stop()
void Server::step(float dtime)
{
// Limit a bit
if (dtime > 2.0)
dtime = 2.0;
if (dtime > DTIME_LIMIT)
dtime = DTIME_LIMIT;
{
MutexAutoLock lock(m_step_dtime_mutex);
m_step_dtime += dtime;