diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 01ef7d2e..6a024dc4 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -876,13 +876,15 @@ void GameRenderer::updateLightTexture(float a) const __m256 v255 = _mm256_set1_ps(255.0f); #endif + // 4J-JEV: Now doing light textures on PER PLAYER basis. + // 4J - we *had* added separate light textures for all dimensions, and this loop to update them all here for (int j = 0; j < XUSER_MAX_COUNT; j++) { shared_ptr player = Minecraft::GetInstance()->localplayers[j]; if (player == nullptr) continue; - Level *level = player->level; + Level *level = player->level; // 4J - was mc->level when it was just to update the one light texture const float skyDarken1 = level->getSkyDarken(1.0f); const float skyWeight = skyDarken1 * 0.65f + 0.35f; diff --git a/Minecraft.Client/HorseRenderer.cpp b/Minecraft.Client/HorseRenderer.cpp index 0620bedc..e0c7ac90 100644 --- a/Minecraft.Client/HorseRenderer.cpp +++ b/Minecraft.Client/HorseRenderer.cpp @@ -11,9 +11,7 @@ ResourceLocation HorseRenderer::HORSE_SKELETON_LOCATION = ResourceLocation(TN_MO std::map HorseRenderer::LAYERED_LOCATION_CACHE; -HorseRenderer::HorseRenderer(Model *model, float f) : MobRenderer(model, f) -{ -} +HorseRenderer::HorseRenderer(Model *model, float f) : MobRenderer(model, f) {} void HorseRenderer::adjustHeight(shared_ptr mob, float FHeight) { @@ -26,13 +24,10 @@ void HorseRenderer::scale(shared_ptr entityliving, float f) int type = dynamic_pointer_cast(entityliving)->getType(); if (type == EntityHorse::TYPE_DONKEY) - { sizeFactor *= 0.87F; - } else if (type == EntityHorse::TYPE_MULE) - { sizeFactor *= 0.92F; - } + glScalef(sizeFactor, sizeFactor, sizeFactor); MobRenderer::scale(entityliving, f); } @@ -40,15 +35,14 @@ void HorseRenderer::scale(shared_ptr entityliving, float f) void HorseRenderer::renderModel(shared_ptr mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) { if (mob->isInvisible()) - { model->setupAnim(wp, ws, bob, headRotMinusBodyRot, headRotx, scale, mob); - } else { EntityRenderer::bindTexture(mob); model->render(mob, wp, ws, bob, headRotMinusBodyRot, headRotx, scale, true); // Ensure that any extra layers of texturing are disabled after rendering this horse RenderManager.TextureBind(-1); + //RenderManager.TextureBind(1, -1); } } @@ -60,9 +54,7 @@ void HorseRenderer::bindTexture(ResourceLocation *location) entityRenderDispatcher->textures->bindTextureLayers(location); } else - { EntityRenderer::bindTexture(location); - } } ResourceLocation *HorseRenderer::getTextureLocation(shared_ptr entity) @@ -93,9 +85,7 @@ ResourceLocation *HorseRenderer::getOrCreateLayeredTextureLocation(shared_ptrsecond; - } else { LAYERED_LOCATION_CACHE[textureName] = new ResourceLocation(horse->getLayeredTextureLayers()); diff --git a/Minecraft.Client/Textures.cpp b/Minecraft.Client/Textures.cpp index a341165b..f099fba8 100644 --- a/Minecraft.Client/Textures.cpp +++ b/Minecraft.Client/Textures.cpp @@ -530,6 +530,18 @@ void Textures::bindTextureLayers(ResourceLocation *resource) RenderManager.TextureBind(id); } +/* +void Textures::bindTextureLayers(ResourceLocation *resource) +{ + assert(resource->isPreloaded()); + + int layers = resource->getTextureCount(); + + for( int i = 0; i < layers; i++ ) + RenderManager.TextureBind(i, loadTexture(resource->getTexture(i))); +} +*/ + void Textures::bind(int id) { //if (id != lastBoundId) diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/inc/4J_Render.h b/Minecraft.Client/Windows64/Libs/4JLibs/inc/4J_Render.h index f5424a4e..7fe70415 100644 --- a/Minecraft.Client/Windows64/Libs/4JLibs/inc/4J_Render.h +++ b/Minecraft.Client/Windows64/Libs/4JLibs/inc/4J_Render.h @@ -169,6 +169,7 @@ public: // Textures int TextureCreate(); void TextureFree(int idx); + void TextureBind(int slot, int idx); void TextureBind(int idx); void TextureBindVertex(int idx); void TextureSetTextureLevels(int levels); diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input.lib index fdd3685a..9b303728 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input_d.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input_d.lib index bc57eaaf..4a64105c 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input_d.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Input_d.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile.lib index 73634b5e..d3e2d12d 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile_d.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile_d.lib index dd27b1c4..a7065e1c 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile_d.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Profile_d.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC.lib index 9283054b..7435cff3 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC_d.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC_d.lib index 8d391222..8f786261 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC_d.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Render_PC_d.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage.lib index 1295135e..f995fd1f 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage.lib differ diff --git a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage_d.lib b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage_d.lib index c8f333d2..24646f55 100644 Binary files a/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage_d.lib and b/Minecraft.Client/Windows64/Libs/4JLibs/libs/4J_Storage_d.lib differ