mirror of
https://github.com/minetest/minetest.git
synced 2024-11-20 06:33:45 +01:00
Remove obsolete client connection init workaround
m_connection_reinit_timer has a head-start of 0.1s and this code only took effect for the very first game session so it was broken anyway.
This commit is contained in:
parent
43363ee066
commit
7afa78ec82
@ -436,20 +436,14 @@ void Client::step(float dtime)
|
||||
}
|
||||
}
|
||||
|
||||
// UGLY hack to fix 2 second startup delay caused by non existent
|
||||
// server client startup synchronization in local server or singleplayer mode
|
||||
static bool initial_step = true;
|
||||
if (initial_step) {
|
||||
initial_step = false;
|
||||
}
|
||||
else if(m_state == LC_Created) {
|
||||
if (m_state == LC_Created) {
|
||||
float &counter = m_connection_reinit_timer;
|
||||
counter -= dtime;
|
||||
if(counter <= 0.0) {
|
||||
counter = 2.0;
|
||||
if (counter <= 0) {
|
||||
counter = 1.5f;
|
||||
|
||||
LocalPlayer *myplayer = m_env.getLocalPlayer();
|
||||
FATAL_ERROR_IF(myplayer == NULL, "Local player not found in environment.");
|
||||
FATAL_ERROR_IF(!myplayer, "Local player not found in environment");
|
||||
|
||||
sendInit(myplayer->getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user