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:
Brent
2023-08-07 04:02:35 -05:00
committed by GitHub
parent 0c8b22d36b
commit b77d42b04a
5 changed files with 7 additions and 6 deletions

View File

@@ -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();