mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
wtf
This commit is contained in:
@@ -226,6 +226,7 @@ static void* fetchSkinForPlayer(void* param) {
|
|||||||
std::string skinUrl = getSkinUrlForUsername(player->name);
|
std::string skinUrl = getSkinUrlForUsername(player->name);
|
||||||
if (skinUrl.empty()) {
|
if (skinUrl.empty()) {
|
||||||
LOGW("[Skin] skin URL lookup failed for %s\n", player->name.c_str());
|
LOGW("[Skin] skin URL lookup failed for %s\n", player->name.c_str());
|
||||||
|
player->setTextureName("mob/char.png");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,6 +247,7 @@ static void* fetchSkinForPlayer(void* param) {
|
|||||||
player->setTextureName("skins/" + player->name + ".png");
|
player->setTextureName("skins/" + player->name + ".png");
|
||||||
} else {
|
} else {
|
||||||
LOGW("[Skin] failed to write skin cache %s\n", cacheFile.c_str());
|
LOGW("[Skin] failed to write skin cache %s\n", cacheFile.c_str());
|
||||||
|
player->setTextureName("mob/char.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -328,8 +330,11 @@ LocalPlayer::LocalPlayer(Minecraft* minecraft, Level* level, const std::string&
|
|||||||
_init();
|
_init();
|
||||||
|
|
||||||
#ifndef STANDALONE_SERVER
|
#ifndef STANDALONE_SERVER
|
||||||
|
printf("%s \n", name.c_str());
|
||||||
|
|
||||||
if (!name.empty()) {
|
if (!name.empty()) {
|
||||||
this->name = name;
|
this->name = name;
|
||||||
|
printf("test \n");
|
||||||
// Fetch user skin and cape from Mojang servers in the background (avoids blocking the main thread)
|
// Fetch user skin and cape from Mojang servers in the background (avoids blocking the main thread)
|
||||||
// TODO: Fix this memory leak
|
// TODO: Fix this memory leak
|
||||||
new CThread(fetchSkinForPlayer, this);
|
new CThread(fetchSkinForPlayer, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user