mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-07-06 00:17:04 +00:00
fix: misc issues + crashes
This commit is contained in:
parent
8d86287e5e
commit
73145785d4
|
|
@ -131,6 +131,7 @@ void UIScene_JoinMenu::updateTooltips()
|
|||
|
||||
void UIScene_JoinMenu::tick()
|
||||
{
|
||||
if (this == nullptr) return;
|
||||
if (!m_friendInfoRequestIssued)
|
||||
{
|
||||
ui.NavigateToScene(m_iPad, eUIScene_Timer);
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ void LivingEntityRenderer::render(shared_ptr<Entity> _mob, double x, double y, d
|
|||
{
|
||||
glColor4f(br, 0, 0, 0.4f);
|
||||
resModel->render(mob, wp, ws, bob, headRot - bodyRot, headRotx, fScale, false);
|
||||
/* removed in TU24 - Fireblade
|
||||
for (int i = 0; i < MAX_ARMOR_LAYERS; i++)
|
||||
{
|
||||
if (prepareArmorOverlay(mob, i, a) >= 0)
|
||||
|
|
@ -235,6 +236,7 @@ void LivingEntityRenderer::render(shared_ptr<Entity> _mob, double x, double y, d
|
|||
armor->render(mob, wp, ws, bob, headRot - bodyRot, headRotx, fScale, false);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if (((overlayColor >> 24) & 0xff) > 0)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,26 @@ template <class T> class arrayWithLength
|
|||
public:
|
||||
T *data;
|
||||
unsigned int length;
|
||||
arrayWithLength() { data = nullptr; length = 0; }
|
||||
arrayWithLength(unsigned int elements, bool bClearArray=true) { assert(elements!=0); data = new T[elements]; if(bClearArray){ memset( data,0,sizeof(T)*elements); } this->length = elements; }
|
||||
|
||||
arrayWithLength() {
|
||||
data = nullptr;
|
||||
length = 0;
|
||||
|
||||
}
|
||||
arrayWithLength(unsigned int elements, bool bClearArray=true) {
|
||||
if (elements == 0) {
|
||||
data = nullptr;
|
||||
length = 0;
|
||||
return;
|
||||
}
|
||||
data = new T[elements];
|
||||
|
||||
if(bClearArray)
|
||||
{
|
||||
memset(data, 0, sizeof(T) * elements);
|
||||
}
|
||||
this->length = elements;
|
||||
}
|
||||
|
||||
// 4J Stu Added this ctor so I static init arrays in the Item derivation tree
|
||||
arrayWithLength( T data[], unsigned int elements) { this->data = data; this->length = elements; }
|
||||
|
|
|
|||
|
|
@ -39,6 +39,18 @@ int ChestTile::getRenderShape()
|
|||
return Tile::SHAPE_ENTITYTILE_ANIMATED;
|
||||
}
|
||||
|
||||
AABB *ChestTile::getTileAABB(Level *level, int x, int y, int z)
|
||||
{
|
||||
updateShape(level, x, y, z, -1, shared_ptr<TileEntity>());
|
||||
return Tile::getTileAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
AABB *ChestTile::getAABB(Level *level, int x, int y, int z)
|
||||
{
|
||||
updateShape(level, x, y, z, -1, shared_ptr<TileEntity>());
|
||||
return Tile::getAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
void ChestTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity)
|
||||
{
|
||||
if (level->getTile(x, y, z - 1) == id)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ public:
|
|||
virtual bool isSolidRender(bool isServerLevel = false);
|
||||
virtual bool isCubeShaped();
|
||||
virtual int getRenderShape();
|
||||
virtual AABB *getTileAABB(Level *level, int x, int y, int z);
|
||||
virtual AABB *getAABB(Level *level, int x, int y, int z);
|
||||
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>());
|
||||
virtual void onPlace(Level *level, int x, int y, int z);
|
||||
virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr<LivingEntity> by, shared_ptr<ItemInstance> itemInstance);
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ Entity::Entity(Level *level, bool useSmallId) // 4J - added useSmallId parameter
|
|||
// resetPos();
|
||||
setPos(0, 0, 0);
|
||||
|
||||
if (level != nullptr)
|
||||
if (level != nullptr && level->dimension != nullptr)
|
||||
{
|
||||
dimension = level->dimension->id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue