mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-11 03:22:59 +00:00
Merge remote-tracking branch 'origin/main' into exp/worldgen
Some checks failed
Stable Release / Build Client (push) Has been cancelled
Stable Release / Build Server (push) Has been cancelled
Stable Release / Release Server (push) Has been cancelled
Stable Release / Release Client (push) Has been cancelled
Stable Release / cleanup (push) Has been cancelled
Some checks failed
Stable Release / Build Client (push) Has been cancelled
Stable Release / Build Server (push) Has been cancelled
Stable Release / Release Server (push) Has been cancelled
Stable Release / Release Client (push) Has been cancelled
Stable Release / cleanup (push) Has been cancelled
This commit is contained in:
commit
40115f4804
|
|
@ -56,8 +56,7 @@ enum EGameHostOptionWorldSize
|
|||
e_worldSize_Classic,
|
||||
e_worldSize_Small,
|
||||
e_worldSize_Medium,
|
||||
e_worldSize_Large,
|
||||
e_worldSize_Expanded
|
||||
e_worldSize_Large
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level *level)
|
|||
this->level = level;
|
||||
|
||||
this->cache = new LevelChunk *[XZSIZE * XZSIZE];
|
||||
memset(this->cache, 0, sizeof(LevelChunk*) * XZSIZE * XZSIZE);
|
||||
memset(this->cache, 0, XZSIZE * XZSIZE * sizeof(LevelChunk *));
|
||||
InitializeCriticalSectionAndSpinCount(&m_csLoadCreate,4000);
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ bool MultiPlayerChunkCache::reallyHasChunk(int x, int z)
|
|||
int idx = ix * XZSIZE + iz;
|
||||
|
||||
LevelChunk *chunk = cache[idx];
|
||||
if (chunk == nullptr)
|
||||
if( chunk == nullptr )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -145,8 +145,7 @@ void MultiPlayerChunkCache::drop(const int x, const int z)
|
|||
const int iz = z + XZOFFSET;
|
||||
if ((ix < 0) || (ix >= XZSIZE)) return;
|
||||
if ((iz < 0) || (iz >= XZSIZE)) return;
|
||||
|
||||
int idx = ix * XZSIZE + iz;
|
||||
const int idx = ix * XZSIZE + iz;
|
||||
LevelChunk* chunk = cache[idx];
|
||||
|
||||
if (chunk != nullptr && !chunk->isEmpty())
|
||||
|
|
@ -170,7 +169,6 @@ LevelChunk *MultiPlayerChunkCache::create(int x, int z)
|
|||
if( ( ix < 0 ) || ( ix >= XZSIZE ) ) return ( waterChunk ? waterChunk : emptyChunk );
|
||||
if( ( iz < 0 ) || ( iz >= XZSIZE ) ) return ( waterChunk ? waterChunk : emptyChunk );
|
||||
int idx = ix * XZSIZE + iz;
|
||||
|
||||
LevelChunk *chunk = cache[idx];
|
||||
LevelChunk *lastChunk = chunk;
|
||||
|
||||
|
|
|
|||
|
|
@ -628,8 +628,6 @@ static std::string WorldSizeToPropertyValue(int worldSize)
|
|||
return "medium";
|
||||
case e_worldSize_Large:
|
||||
return "large";
|
||||
case e_worldSize_Expanded:
|
||||
return "expanded";
|
||||
case e_worldSize_Classic:
|
||||
default:
|
||||
return "classic";
|
||||
|
|
@ -646,8 +644,6 @@ static int WorldSizeToXzChunks(int worldSize)
|
|||
return LEVEL_WIDTH_MEDIUM;
|
||||
case e_worldSize_Large:
|
||||
return LEVEL_WIDTH_LARGE;
|
||||
case e_worldSize_Expanded:
|
||||
return LEVEL_WIDTH_EXPANDED;
|
||||
case e_worldSize_Classic:
|
||||
default:
|
||||
return LEVEL_WIDTH_CLASSIC;
|
||||
|
|
@ -663,7 +659,6 @@ static int WorldSizeToHellScale(int worldSize)
|
|||
case e_worldSize_Medium:
|
||||
return HELL_LEVEL_SCALE_MEDIUM;
|
||||
case e_worldSize_Large:
|
||||
case e_worldSize_Expanded:
|
||||
return HELL_LEVEL_SCALE_LARGE;
|
||||
case e_worldSize_Classic:
|
||||
default:
|
||||
|
|
@ -699,12 +694,6 @@ static bool TryParseWorldSize(const std::string &lowered, int *outWorldSize)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (lowered == "expanded" || lowered == "344" || lowered == "8")
|
||||
{
|
||||
*outWorldSize = e_worldSize_Expanded;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@ class TilePos;
|
|||
// The maximum number of chunks that we can store
|
||||
#ifdef _LARGE_WORLDS
|
||||
// 4J Stu - Our default map (at zoom level 3) is 1024x1024 blocks (or 64 chunks)
|
||||
#define LEVEL_MAX_WIDTH (5*64) //(6*54)
|
||||
|
||||
#define LEVEL_WIDTH_CLASSIC 54
|
||||
#define LEVEL_WIDTH_SMALL 64
|
||||
#define LEVEL_WIDTH_MEDIUM (3*64)
|
||||
#define LEVEL_WIDTH_LARGE (5*64)
|
||||
#define LEVEL_WIDTH_EXPANDED (5*64) + 24
|
||||
|
||||
|
||||
#define LEVEL_MAX_WIDTH LEVEL_WIDTH_EXPANDED
|
||||
|
||||
#else
|
||||
#define LEVEL_MAX_WIDTH 54
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ DWORD Level::tlsIdxLightCache = TlsAlloc();
|
|||
|
||||
// 4J : WESTY : Added for time played stats.
|
||||
#include "net.minecraft.stats.h"
|
||||
#include "../Minecraft.Client/MultiPlayerChunkCache.h"
|
||||
|
||||
// 4J - Caching of lighting data added. This is implemented as a 16x16x16 cache of ints (ie 16K storage in total). The index of the element to be used in the array is determined by the lower
|
||||
// four bits of each x/y/z position, and the upper 7/4/7 bits of the x/y/z positions are stored within the element itself along with the cached values etc. The cache can be enabled per thread by
|
||||
|
|
@ -1336,7 +1335,7 @@ int Level::getBrightness(LightLayer::variety layer, int x, int y, int z)
|
|||
int idx = ix * chunkSourceXZSize + iz;
|
||||
LevelChunk *c = chunkSourceCache[idx];
|
||||
|
||||
if( c == nullptr) return (int)layer;
|
||||
if( c == nullptr ) return (int)layer;
|
||||
|
||||
if (y < 0) y = 0;
|
||||
if (y >= maxBuildHeight) y = maxBuildHeight - 1;
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ LevelData::LevelData(CompoundTag *tag)
|
|||
case LEVEL_WIDTH_SMALL: hostOptionworldSize = e_worldSize_Small; break;
|
||||
case LEVEL_WIDTH_MEDIUM: hostOptionworldSize = e_worldSize_Medium; break;
|
||||
case LEVEL_WIDTH_LARGE: hostOptionworldSize = e_worldSize_Large; break;
|
||||
case LEVEL_WIDTH_EXPANDED: hostOptionworldSize = e_worldSize_Expanded; break;
|
||||
default: assert(0); break;
|
||||
}
|
||||
app.SetGameHostOption(eGameHostOption_WorldSize, hostOptionworldSize );
|
||||
|
|
|
|||
5
NOTES.md
5
NOTES.md
|
|
@ -1,7 +1,6 @@
|
|||
# neoLegacy v1.0.5b
|
||||
# neoLegacy v1.0.7b
|
||||
|
||||
### Bug Fixes
|
||||
- Fixed crashing, lagging, and lighting issues caused by expanded world generation.
|
||||
- Reverted "Expanded" world size due to it causing crashing and lighting issues.
|
||||
|
||||
<img width="784" height="410" alt="roadmap" src="https://github.com/user-attachments/assets/134856ae-b151-4003-aa97-7ecf19ccd278" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue