mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
Only resend default texture pack when the url changes, thus meaning we can now avoid the full map refresh for the ClassicalSharp dev builds.
This commit is contained in:
parent
2b96cc8445
commit
98482bebc5
@ -197,6 +197,7 @@ namespace MCGalaxy
|
||||
}
|
||||
}
|
||||
|
||||
string lastUrl = "";
|
||||
public void SendCurrentMapAppearance() {
|
||||
byte edgeBlock = level.EdgeBlock, horBlock = level.HorizonBlock;
|
||||
if (edgeBlock >= Block.CpeCount && !hasBlockDefs)
|
||||
@ -210,9 +211,10 @@ namespace MCGalaxy
|
||||
url = Server.defaultTexturePackUrl == "" ? Server.defaultTerrainUrl : Server.defaultTexturePackUrl;
|
||||
|
||||
// reset all other textures back to client default.
|
||||
if (url != lastUrl)
|
||||
SendSetMapAppearanceV2("", edgeBlock, horBlock, level.EdgeLevel, level.CloudsHeight, level.MaxFogDistance);
|
||||
if (url != "")
|
||||
SendSetMapAppearanceV2(url, edgeBlock, horBlock, level.EdgeLevel, level.CloudsHeight, level.MaxFogDistance);
|
||||
lastUrl = url;
|
||||
} else {
|
||||
string url = level.terrainUrl == "" ? Server.defaultTerrainUrl : level.terrainUrl;
|
||||
SendSetMapAppearance(url, edgeBlock, horBlock, level.EdgeLevel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user