FIX: render
ty shredder
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "../client/gamemode/GameMode.h"
|
||||
#include "world/item/ItemInstance.h"
|
||||
#include "world/level/LevelConstants.h"
|
||||
#include <cstddef>
|
||||
#ifndef STANDALONE_SERVER
|
||||
#include "../client/gui/screens/DisconnectionScreen.h"
|
||||
#endif
|
||||
@@ -120,6 +121,7 @@ void ClientSideNetworkHandler::onDisconnect(const RakNet::RakNetGUID& guid)
|
||||
}
|
||||
}
|
||||
}
|
||||
minecraft->setLevel(NULL);
|
||||
#ifndef STANDALONE_SERVER
|
||||
minecraft->gui.addMessage("Disconnected from server");
|
||||
#endif
|
||||
@@ -354,7 +356,7 @@ void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& source, RemoveEn
|
||||
if (!level) return;
|
||||
|
||||
Entity* entity = level->getEntity(packet->entityId);
|
||||
LOGI("RemoveEntityPacket %p %p, %d\n", entity, minecraft->player, entity?(int)(entity->isPlayer()): -1);
|
||||
// LOGI("RemoveEntityPacket %p %p, %d\n", entity, minecraft->player, entity?(int)(entity->isPlayer()): -1);
|
||||
if (!entity) return;
|
||||
|
||||
level->removeEntity(entity);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "../../item/StoneSlabTileItem.h"
|
||||
#include "../../item/SaplingTileItem.h"
|
||||
#include "../../item/ItemCategory.h"
|
||||
#include "world/level/LevelConstants.h"
|
||||
|
||||
const int Tile::RENDERLAYER_OPAQUE = 0;
|
||||
const int Tile::RENDERLAYER_ALPHATEST = 1;
|
||||
@@ -512,10 +513,15 @@ bool Tile::shouldRenderFace( LevelSource* level, int x, int y, int z, int face )
|
||||
{
|
||||
if (face == 0 && y == -1) return false;
|
||||
// For fixed size worlds //@todo: external constants rather than magic numbers
|
||||
// @fixme @ahtung temp fix
|
||||
|
||||
auto xz = LevelConstants::CHUNK_CACHE_WIDTH == 16 ? 256 :
|
||||
LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH / (LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH / 256 / 2);
|
||||
|
||||
if (face == 2 && z == -1) return false;
|
||||
if (face == 3 && z == 256) return false;
|
||||
if (face == 3 && z == xz) return false;
|
||||
if (face == 4 && x == -1) return false;
|
||||
if (face == 5 && x == 256) return false;
|
||||
if (face == 5 && x == xz) return false;
|
||||
// Common
|
||||
if (face == 0 && yy0 > 0) return true;
|
||||
if (face == 1 && yy1 < 1) return true;
|
||||
|
||||
Reference in New Issue
Block a user