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:
@@ -61,9 +61,9 @@ void ChangeStateConstraint::tick(int iPad)
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != nullptr && player->connection && player->connection->getNetworkPlayer() != nullptr)
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send(std::make_shared<PlayerInfoPacket>(player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs));
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void ChangeStateConstraint::tick(int iPad)
|
||||
|
||||
if(m_changeGameMode)
|
||||
{
|
||||
if(minecraft->localgameModes[iPad] != nullptr)
|
||||
if(minecraft->localgameModes[iPad] != NULL)
|
||||
{
|
||||
m_changedFromGameMode = minecraft->localplayers[iPad]->abilities.instabuild ? GameType::CREATIVE : GameType::SURVIVAL;
|
||||
|
||||
@@ -102,9 +102,9 @@ void ChangeStateConstraint::tick(int iPad)
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != nullptr && player->connection && player->connection->getNetworkPlayer() != nullptr)
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send(std::make_shared<PlayerInfoPacket>(player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs));
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,9 +126,9 @@ void ChangeStateConstraint::tick(int iPad)
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != nullptr && player->connection && player->connection->getNetworkPlayer() != nullptr)
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send(std::make_shared<PlayerInfoPacket>(player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs));
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user