Improve Survival Mode + others (#56)

* * Undo some of the changes done in the "* Work on survival mode." commit.
* TEST_SURVIVAL_MODE is now on by default.

* * Dying no longer crashes the game.

* * Death seems to work ok.

* * Improve some of the damage code.

* x

* work

* Fixed the Makefile (#54)

* * Finally fix the crack texture appearing to flicker/restart

* * Add VS2010 as an optional target.

Fix build with VS2010 (both windows_vs and xenon_vs).

* * Disable survival mode. Getting ready to merge now!

---------

Co-authored-by: Alexander Argentakis <38327951+MFDGaming@users.noreply.github.com>
This commit is contained in:
iProgramInCpp
2023-08-16 22:32:09 +03:00
committed by GitHub
parent 5e8119d279
commit 9a24abc603
63 changed files with 3599 additions and 184 deletions

View File

@@ -502,6 +502,10 @@ void GameRenderer::renderLevel(float f)
glDisable(GL_ALPHA_TEST);
//pLR->renderHitOutline((Player*)pMob, m_pMinecraft->m_hitResult, 0, nullptr, f);
pLR->renderHitSelect((Player*)pMob, m_pMinecraft->m_hitResult, 0, nullptr, f);
// added by iProgramInCpp
pLR->renderHit((Player*)pMob, m_pMinecraft->m_hitResult, 0, nullptr, f);
glEnable(GL_ALPHA_TEST);
}
@@ -638,9 +642,9 @@ void GameRenderer::render(float f)
{
if (m_pMinecraft->m_pLocalPlayer)
{
char posStr[64];
char posStr[96];
Vec3 pos = m_pMinecraft->m_pLocalPlayer->getPos(f);
snprintf(posStr, sizeof posStr, "%.2f, %.2f, %.2f", pos.x, pos.y, pos.z);
sprintf(posStr, "%.2f, %.2f, %.2f", pos.x, pos.y, pos.z);
debugText << "\npos: " << posStr;
debugText << "\n" << m_pMinecraft->m_pLevelRenderer->gatherStats1();
@@ -821,8 +825,9 @@ void GameRenderer::pick(float f)
EntityVector* pEnts = m_pMinecraft->m_pLevel->getEntities(pMob, scanAABB);
float fDist = 0.0f;
for (auto pEnt : *pEnts)
for (int i = 0; i < int(pEnts->size()); i++)
{
Entity *pEnt = (*pEnts)[i];
if (!pEnt->isPickable())
continue;