fix: UB in DemoLevel
This commit is contained in:
@@ -2,7 +2,16 @@
|
||||
#include "DemoLevel.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.level.storage.h"
|
||||
|
||||
DemoLevel::DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED)
|
||||
const LevelSettings DemoLevel::DEMO_LEVEL_SETTINGS = LevelSettings(
|
||||
DemoLevel::DEMO_LEVEL_SEED,
|
||||
GameType::SURVIVAL,
|
||||
false,
|
||||
false,
|
||||
false, LevelType::lvl_normal_1_1, LEVEL_MAX_WIDTH,
|
||||
1.0
|
||||
);
|
||||
|
||||
DemoLevel::DemoLevel(shared_ptr<LevelStorage> levelStorage, const wstring& levelName) : Level(levelStorage, levelName, &DEMO_LEVEL_SETTINGS)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
class DemoLevel : public Level
|
||||
{
|
||||
private:
|
||||
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
|
||||
static const LevelSettings DEMO_LEVEL_SETTINGS;
|
||||
static const int DEMO_SPAWN_X = 796;
|
||||
static const int DEMO_SPAWN_Y = 72;
|
||||
static const int DEMO_SPAWN_Z = -731;
|
||||
|
||||
Reference in New Issue
Block a user