mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
Fixed rendering bugs & crashes (#36)
* Fixed rendering bugs & crashes * Fixed shading of cubes (includes Steve & Camera head) * Fixed crash from rendering of Air item in hand * Fixed crash from right-clicking with Air item in-hand * TripodCameraRenderer no longer uses Cube::renderHorrible --------- Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
This commit is contained in:
@@ -251,7 +251,7 @@ label_3:
|
||||
|
||||
ItemInstance* pItem = getSelectedItem();
|
||||
|
||||
if (m_pGameMode->useItemOn(m_pLocalPlayer, m_pLevel, pItem->m_itemID < 0 ? nullptr : pItem, hr.m_tileX, hr.m_tileY, hr.m_tileZ, hr.m_hitSide))
|
||||
if (m_pGameMode->useItemOn(m_pLocalPlayer, m_pLevel, pItem->m_itemID <= 0 ? nullptr : pItem, hr.m_tileX, hr.m_tileY, hr.m_tileZ, hr.m_hitSide))
|
||||
{
|
||||
m_pLocalPlayer->swing();
|
||||
if (!isOnline())
|
||||
@@ -301,7 +301,7 @@ label_3:
|
||||
{
|
||||
label_15:
|
||||
int id = m_pLocalPlayer->m_pInventory->getSelectedItemId();
|
||||
if (id >= 0)
|
||||
if (id > 0)
|
||||
{
|
||||
ItemInstance* pItem = getSelectedItem();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user