mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-03 08:52:55 +00:00
fix: UB in DemoLevel
This commit is contained in:
parent
cc34168277
commit
17d6e670cc
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue