mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fix exceptions when exiting after opening world.
This commit is contained in:
parent
b1b4435c01
commit
48a649abf1
|
|
@ -103,7 +103,7 @@ void Chunk::setPos(int x, int y, int z)
|
|||
// 4J - changed to just set the value rather than make a new one, if we've already created storage
|
||||
if( bb == NULL )
|
||||
{
|
||||
bb = AABB::newPermanent(-g, -g, -g, XZSIZE+g, SIZE+g, XZSIZE+g);
|
||||
bb = std::unique_ptr<AABB>(AABB::newPermanent(-g, -g, -g, XZSIZE+g, SIZE+g, XZSIZE+g));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -171,7 +171,7 @@ void Chunk::makeCopyForRebuild(Chunk *source)
|
|||
this->xm = source->xm;
|
||||
this->ym = source->ym;
|
||||
this->zm = source->zm;
|
||||
this->bb = source->bb;
|
||||
this->bb = move(source->bb);
|
||||
this->clipChunk = NULL;
|
||||
this->id = source->id;
|
||||
this->globalRenderableTileEntities = source->globalRenderableTileEntities;
|
||||
|
|
@ -998,7 +998,7 @@ int Chunk::getList(int layer)
|
|||
|
||||
void Chunk::cull(Culler *culler)
|
||||
{
|
||||
clipChunk->visible = culler->isVisible(bb);
|
||||
clipChunk->visible = culler->isVisible(bb.get());
|
||||
}
|
||||
|
||||
void Chunk::renderBB()
|
||||
|
|
@ -1029,7 +1029,7 @@ void Chunk::clearDirty()
|
|||
|
||||
Chunk::~Chunk()
|
||||
{
|
||||
delete bb;
|
||||
// delete bb;
|
||||
}
|
||||
|
||||
bool Chunk::emptyFlagSet(int layer)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
int xRenderOffs, yRenderOffs, zRenderOffs;
|
||||
|
||||
int xm, ym, zm;
|
||||
AABB *bb;
|
||||
unique_ptr<AABB> bb;
|
||||
ClipChunk *clipChunk;
|
||||
|
||||
int id;
|
||||
|
|
|
|||
Loading…
Reference in a new issue