mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 22:11:07 +00:00
make map sending a bit more lazy, that way it's always instant to login in the game, even if some chunks are missing
This commit is contained in:
parent
86b83e4e8d
commit
0c738d1b74
1 changed files with 7 additions and 2 deletions
|
|
@ -88,7 +88,11 @@ function inject(serv,player)
|
|||
|
||||
function sendMap()
|
||||
{
|
||||
var initialChunks=sendChunksAroundPlayer(2);
|
||||
return sendChunksAroundPlayer(3);
|
||||
}
|
||||
|
||||
function sendRestMap()
|
||||
{
|
||||
player.sendingChunks=true;
|
||||
sendChunksAroundPlayer(player.view).then(() => player.sendingChunks=false);
|
||||
|
||||
|
|
@ -99,7 +103,6 @@ function inject(serv,player)
|
|||
sendChunksAroundPlayer(player.view).then(() => player.sendingChunks=false);
|
||||
}
|
||||
});
|
||||
return initialChunks;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -247,6 +250,8 @@ function inject(serv,player)
|
|||
spawn();
|
||||
|
||||
announceJoin();
|
||||
|
||||
setTimeout(sendRestMap,100);
|
||||
}
|
||||
|
||||
player.setGameMode=setGameMode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue