From d9fba3803a103032991edb4a2842a37b264a592e Mon Sep 17 00:00:00 2001 From: arsenicviscera Date: Tue, 10 Mar 2026 18:09:46 -0700 Subject: [PATCH] Revert "mindfuq" This reverts commit 6579d802d5eed3f34d790a2beca58e8dfd163330. --- Minecraft.Client/Common/BuildVer.h | 6 +++--- Minecraft.Client/LivingEntityRenderer.cpp | 13 +++++-------- Minecraft.Client/LocalPlayer.cpp | 1 - Minecraft.Client/PlayerRenderer.cpp | 20 ++------------------ Minecraft.World/LivingEntity.cpp | 3 --- Minecraft.World/LivingEntity.h | 3 --- Minecraft.World/Player.cpp | 11 +---------- Minecraft.World/Player.h | 1 - 8 files changed, 11 insertions(+), 47 deletions(-) diff --git a/Minecraft.Client/Common/BuildVer.h b/Minecraft.Client/Common/BuildVer.h index a5a9494ac..5c73109d7 100644 --- a/Minecraft.Client/Common/BuildVer.h +++ b/Minecraft.Client/Common/BuildVer.h @@ -1,7 +1,7 @@ #pragma once #define VER_PRODUCTBUILD 560 -#define VER_PRODUCTVERSION_STR_W L"" +#define VER_PRODUCTVERSION_STR_W L"DEV (unknown version)" #define VER_FILEVERSION_STR_W VER_PRODUCTVERSION_STR_W -#define VER_BRANCHVERSION_STR_W L"UNKNOWN/" -#define VER_NETWORK VER_PRODUCTBUILD +#define VER_BRANCHVERSION_STR_W L"UNKNOWN BRANCH" +#define VER_NETWORK VER_PRODUCTBUILD \ No newline at end of file diff --git a/Minecraft.Client/LivingEntityRenderer.cpp b/Minecraft.Client/LivingEntityRenderer.cpp index e9308e54b..b3478ba92 100644 --- a/Minecraft.Client/LivingEntityRenderer.cpp +++ b/Minecraft.Client/LivingEntityRenderer.cpp @@ -465,13 +465,11 @@ void LivingEntityRenderer::renderNameTags(shared_ptr mob, double x { if (mob->isSleeping()) { - renderNameTag(mob, msg, x, y - 1.5f, z, 64, mob->nametagColor); //This fills the "color" argument + renderNameTag(mob, msg, x, y - 1.5f, z, 64); } else { - //but THIS. THIS works. ??? - mob->nametagColor = 0xFFFF0000; - renderNameTag(mob, msg, x, y, z, 64, mob->nametagColor); + renderNameTag(mob, msg, x, y, z, 64); } } @@ -550,6 +548,7 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst shared_ptr player = dynamic_pointer_cast(mob); if(app.isXuidDeadmau5( player->getXuid() ) ) offs = -10; + #if defined(__PS3__) || defined(__ORBIS__) // Check we have all the font characters for this player name switch(player->GetPlayerNameValidState()) @@ -650,16 +649,14 @@ void LivingEntityRenderer::renderNameTag(shared_ptr mob, const wst t->end(); glDepthFunc(GL_LEQUAL); glEnable(GL_TEXTURE_2D); + glTranslatef(0.0f, 0.0f, -0.04f); } if( textOpacity > 0.0f ) { - //This works as intended int textColor = ( ( static_cast(textOpacity * 255) << 24 ) | 0xffffff ); - font->draw(L"PLR " + mob->SettingThis ? L"YES" : L"NO", -font->width(playerName) / 2, offs, textColor); - - + font->draw(playerName, -font->width(playerName) / 2, offs, textColor); } glEnable(GL_LIGHTING); diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index 75906f986..7988416ad 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -120,7 +120,6 @@ LocalPlayer::LocalPlayer(Minecraft *minecraft, Level *level, User *user, int dim lastClickTolerance = 0.0f; m_bHasAwardedStayinFrosty = false; - } LocalPlayer::~LocalPlayer() diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index 05bee6433..a9b945440 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -65,7 +65,8 @@ PlayerRenderer::PlayerRenderer() : LivingEntityRenderer( new HumanoidModel(0), 0 unsigned int PlayerRenderer::getNametagColour(int index) { - if( index >= 0 && index < MINECRAFT_NET_MAX_PLAYERS) return nametagColorForIndex(index); + if( index >= 0 && index < MINECRAFT_NET_MAX_PLAYERS) + return nametagColorForIndex(index); return 0xFF000000; } @@ -495,23 +496,6 @@ void PlayerRenderer::renderNameTags(shared_ptr player, double x, d } #endif - //Check if the player is a local or server player, and if so, add the gamertag prefix to the nametag - //For some reason this is a LivingEntity instead of a Player, but this is derived from LivingEntityRenderer so it makes sense - //Anyways just recast - - if (player->instanceof(eTYPE_PLAYER)) { - shared_ptr plr = static_pointer_cast(player); - //This doesn't work for some reason - player->nametagColor = 0xFF0000FF; - - //But this does??? nametagColor is still black in the renderNameTag method, but it is set to the correct color here, so maybe the renderNameTag method is using a different player instance or something? - - - player->SettingThis = true; //This is how I know - } - - //Set it literally right before, mind you both player and mob are LivingEntity - player->nametagColor = 0xFF0000FF; //This doesn't do anything and is still black. LivingEntityRenderer::renderNameTags(player, x, y, z, msg, scale, dist); } diff --git a/Minecraft.World/LivingEntity.cpp b/Minecraft.World/LivingEntity.cpp index cb40a442b..036adea3b 100644 --- a/Minecraft.World/LivingEntity.cpp +++ b/Minecraft.World/LivingEntity.cpp @@ -93,8 +93,6 @@ void LivingEntity::_init() speed = 0.0f; noJumpDelay = 0; absorptionAmount = 0.0f; - - nametagColor = 0xff000000; //default black } LivingEntity::LivingEntity( Level* level) : Entity(level) @@ -116,7 +114,6 @@ LivingEntity::LivingEntity( Level* level) : Entity(level) yHeadRot = yRot; footSize = 0.5f; - } LivingEntity::~LivingEntity() diff --git a/Minecraft.World/LivingEntity.h b/Minecraft.World/LivingEntity.h index 3069f716b..cc8ed79dd 100644 --- a/Minecraft.World/LivingEntity.h +++ b/Minecraft.World/LivingEntity.h @@ -80,9 +80,6 @@ public: float yHeadRot, yHeadRotO; float flyingSpeed; - //New - int nametagColor; - bool SettingThis = false; protected: shared_ptr lastHurtByPlayer; int lastHurtByPlayerTime; diff --git a/Minecraft.World/Player.cpp b/Minecraft.World/Player.cpp index a6d4f568d..480366c4b 100644 --- a/Minecraft.World/Player.cpp +++ b/Minecraft.World/Player.cpp @@ -41,7 +41,6 @@ #include "..\Minecraft.Client\LocalPlayer.h" #include "..\Minecraft.Client\HumanoidModel.h" -#include "..\Minecraft.Client\Common\Colours\ColourTable.h" #include "SoundTypes.h" @@ -102,7 +101,6 @@ void Player::_init() m_bCheckedForModelParts=false; m_bCheckedDLCForModelParts=false; - #if defined(__PS3__) || defined(__ORBIS__) m_ePlayerNameValidState=ePlayerNameValid_NotSet; #endif @@ -110,8 +108,6 @@ void Player::_init() enderChestInventory = std::make_shared(); m_bAwardedOnARail=false; - - } Player::Player(Level *level, const wstring &name) : LivingEntity( level ) @@ -149,18 +145,13 @@ Player::Player(Level *level, const wstring &name) : LivingEntity( level ) setShowOnMaps(app.GetGameHostOption(eGameHostOption_Gamertags)!=0?true:false); m_bIsGuest = false; - - #ifndef _XBOX_ONE // 4J: Set UUID to name on none-XB1 consoles, may change in future but for now // ownership of animals on these consoles is done by name setUUID(name); #endif - - - - } + Player::~Player() { // TODO 4J diff --git a/Minecraft.World/Player.h b/Minecraft.World/Player.h index 0ba8daa80..2e223a1e5 100644 --- a/Minecraft.World/Player.h +++ b/Minecraft.World/Player.h @@ -72,7 +72,6 @@ protected: int jumpTriggerTime; public: - BYTE userType; float oBob, bob;