From 7a5e39aff06ad1b13dbb26b08f4e848a15b2660e Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Tue, 8 Aug 2023 16:15:41 +0300 Subject: [PATCH] * Fix survival test build. --- source/world/tile/Tile.cpp | 12 ++++++------ windows_vs/minecraftcpp.vcxproj | 1 + windows_vs/minecraftcpp.vcxproj.filters | 10 ++-------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/source/world/tile/Tile.cpp b/source/world/tile/Tile.cpp index 1ef6dfc..edcacee 100644 --- a/source/world/tile/Tile.cpp +++ b/source/world/tile/Tile.cpp @@ -1095,19 +1095,19 @@ void Tile::spawnResources(Level* pLevel, int x, int y, int z, int data, float fC return; #ifdef TEST_SURVIVAL_MODE - int count = getResourceCount(&pLevel->field_38); + int count = getResourceCount(&pLevel->m_random); for (int i = 0; i < count; i++) { - if (pLevel->field_38.nextFloat() > fChance) + if (pLevel->m_random.nextFloat() > fChance) continue; - int id = getResource(data, &pLevel->field_38); + int id = getResource(data, &pLevel->m_random); if (id <= 0) continue; - float xo = (pLevel->field_38.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; - float yo = (pLevel->field_38.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; - float zo = (pLevel->field_38.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; + float xo = (pLevel->m_random.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; + float yo = (pLevel->m_random.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; + float zo = (pLevel->m_random.nextFloat() * 0.7f) + (1.0f - 0.7f) * 0.5f; ItemInstance inst(id, 1, getSpawnResourcesAuxValue(data)); ItemEntity* pEntity = new ItemEntity(pLevel, float(x) + xo, float(y) + yo, float(z) + zo, &inst); diff --git a/windows_vs/minecraftcpp.vcxproj b/windows_vs/minecraftcpp.vcxproj index 73efb1d..734d8ad 100644 --- a/windows_vs/minecraftcpp.vcxproj +++ b/windows_vs/minecraftcpp.vcxproj @@ -27,6 +27,7 @@ + diff --git a/windows_vs/minecraftcpp.vcxproj.filters b/windows_vs/minecraftcpp.vcxproj.filters index f6734e2..9215283 100644 --- a/windows_vs/minecraftcpp.vcxproj.filters +++ b/windows_vs/minecraftcpp.vcxproj.filters @@ -94,9 +94,6 @@ {cc57a0f6-733d-44fa-8478-b1826b074d66} - - {d754d82a-1cf9-4e4a-9dfd-2cc79f4d1fc1} - @@ -996,11 +993,8 @@ source\platforms\openal - - Header Files\Third Party - - - Header Files\Third Party + + source\client