Revert "Project modernization (#630)"

This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions
+7 -7
View File
@@ -30,7 +30,7 @@ LoginPacket::LoginPacket()
m_playerCapeId = 0;
m_isGuest = false;
m_newSeaLevel = false;
m_pLevelType = nullptr;
m_pLevelType = NULL;
m_uiGamePrivileges = 0;
m_xzSize = LEVEL_MAX_WIDTH;
m_hellScale = HELL_LEVEL_MAX_SCALE;
@@ -59,7 +59,7 @@ LoginPacket::LoginPacket(const wstring& userName, int clientVersion, PlayerUID o
m_playerCapeId = capeId;
m_isGuest = isGuest;
m_newSeaLevel = false;
m_pLevelType = nullptr;
m_pLevelType = NULL;
m_uiGamePrivileges = 0;
m_xzSize = LEVEL_MAX_WIDTH;
m_hellScale = HELL_LEVEL_MAX_SCALE;
@@ -100,7 +100,7 @@ void LoginPacket::read(DataInputStream *dis) //throws IOException
userName = readUtf(dis, Player::MAX_NAME_LENGTH);
wstring typeName = readUtf(dis, 16);
m_pLevelType = LevelType::getLevelType(typeName);
if (m_pLevelType == nullptr)
if (m_pLevelType == NULL)
{
m_pLevelType = LevelType::lvl_normal;
}
@@ -135,7 +135,7 @@ void LoginPacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeInt(clientVersion);
writeUtf(userName, dos);
if (m_pLevelType == nullptr)
if (m_pLevelType == NULL)
{
writeUtf(L"", dos);
}
@@ -174,10 +174,10 @@ void LoginPacket::handle(PacketListener *listener)
int LoginPacket::getEstimatedSize()
{
int length=0;
if (m_pLevelType != nullptr)
if (m_pLevelType != NULL)
{
length = static_cast<int>(m_pLevelType->getGeneratorName().length());
length = (int)m_pLevelType->getGeneratorName().length();
}
return static_cast<int>(sizeof(int) + userName.length() + 4 + 6 + sizeof(int64_t) + sizeof(char) + sizeof(int) + (2 * sizeof(PlayerUID)) + 1 + sizeof(char) + sizeof(BYTE) + sizeof(bool) + sizeof(bool) + length + sizeof(unsigned int));
return (int)(sizeof(int) + userName.length() + 4 + 6 + sizeof(int64_t) + sizeof(char) + sizeof(int) + (2*sizeof(PlayerUID)) +1 + sizeof(char) + sizeof(BYTE) + sizeof(bool) + sizeof(bool) + length + sizeof(unsigned int));
}