replace paths & windows apis, cleanup source tree
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
ClientConnection::ClientConnection(Minecraft *minecraft, const wstring& ip, int port)
|
||||
{
|
||||
// 4J Stu - No longer used as we use the socket version below.
|
||||
assert(FALSE);
|
||||
assert(false);
|
||||
#if 0
|
||||
// 4J - added initiliasers
|
||||
random = new Random();
|
||||
@@ -1141,7 +1141,7 @@ void ClientConnection::handleDisconnect(shared_ptr<DisconnectPacket> packet)
|
||||
pMinecraft->connectionDisconnected( m_userIndex , packet->reason );
|
||||
app.SetDisconnectReason( packet->reason );
|
||||
|
||||
app.SetAction(m_userIndex,eAppAction_ExitWorld,(void *)TRUE);
|
||||
app.SetAction(m_userIndex,eAppAction_ExitWorld,(void *)true);
|
||||
//minecraft->setLevel(NULL);
|
||||
//minecraft->setScreen(new DisconnectedScreen(L"disconnect.disconnected", L"disconnect.genericReason", &packet->reason));
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void ClientConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason,
|
||||
}
|
||||
else
|
||||
{
|
||||
app.SetAction(m_userIndex,eAppAction_ExitWorld,(void *)TRUE);
|
||||
app.SetAction(m_userIndex,eAppAction_ExitWorld,(void *)true);
|
||||
}
|
||||
|
||||
//minecraft->setLevel(NULL);
|
||||
@@ -1610,11 +1610,11 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
// printf("Client: handlePreLogin\n");
|
||||
#if 1
|
||||
// 4J - Check that we can play with all the players already in the game who have Friends-Only UGC set
|
||||
BOOL canPlay = TRUE;
|
||||
BOOL canPlayLocal = TRUE;
|
||||
BOOL canPlay = true;
|
||||
BOOL canPlayLocal = true;
|
||||
BOOL isAtLeastOneFriend = g_NetworkManager.IsHost();
|
||||
BOOL isFriendsWithHost = TRUE;
|
||||
BOOL cantPlayContentRestricted = FALSE;
|
||||
BOOL isFriendsWithHost = true;
|
||||
BOOL cantPlayContentRestricted = false;
|
||||
|
||||
if(!g_NetworkManager.IsHost())
|
||||
{
|
||||
@@ -1637,8 +1637,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(m_userIndex) && ProfileManager.IsGuest(idx))
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1653,10 +1653,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
error = XUserAreUsersFriends(idx,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL);
|
||||
if(error == ERROR_SUCCESS && result != TRUE)
|
||||
if(error == ERROR_SUCCESS && result != true)
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1667,8 +1667,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(m_userIndex) && ProfileManager.IsGuest(m_userIndex))
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1683,10 +1683,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
error = XUserAreUsersFriends(m_userIndex,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL);
|
||||
if(error == ERROR_SUCCESS && result != TRUE)
|
||||
if(error == ERROR_SUCCESS && result != true)
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1726,7 +1726,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
|
||||
// 4J Stu - Everyone joining needs to have at least one friend in the game
|
||||
// Local players are implied friends
|
||||
if( isAtLeastOneFriend != TRUE )
|
||||
if( isAtLeastOneFriend != true )
|
||||
{
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
@@ -1735,7 +1735,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
if( ProfileManager.IsSignedIn(idx) && !ProfileManager.IsGuest(idx) )
|
||||
{
|
||||
error = XUserAreUsersFriends(idx,&packet->m_playerXuids[i],1,&result,NULL);
|
||||
if(error == ERROR_SUCCESS && result == TRUE) isAtLeastOneFriend = TRUE;
|
||||
if(error == ERROR_SUCCESS && result == true) isAtLeastOneFriend = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1774,10 +1774,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
}
|
||||
#else
|
||||
// TODO - handle this kind of things for non-360 platforms
|
||||
canPlay = TRUE;
|
||||
canPlayLocal = TRUE;
|
||||
isAtLeastOneFriend = TRUE;
|
||||
cantPlayContentRestricted= FALSE;
|
||||
canPlay = true;
|
||||
canPlayLocal = true;
|
||||
isAtLeastOneFriend = true;
|
||||
cantPlayContentRestricted= false;
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
|
||||
|
||||
@@ -1857,8 +1857,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
|
||||
if( !isFriend )
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1940,8 +1940,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
|
||||
if( !isFriend )
|
||||
{
|
||||
canPlay = FALSE;
|
||||
isFriendsWithHost = FALSE;
|
||||
canPlay = false;
|
||||
isFriendsWithHost = false;
|
||||
}
|
||||
|
||||
app.DebugPrintf("ClientConnection::handlePreLogin: User is friends with the host? %s\n", isFriendsWithHost ? "Yes" : "No");
|
||||
@@ -1969,7 +1969,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
|
||||
app.DebugPrintf("Exiting world on handling Pre-Login packet due UGC privileges: %d\n", reason);
|
||||
app.SetDisconnectReason( reason );
|
||||
app.SetAction(ProfileManager.GetPrimaryPad(),eAppAction_ExitWorld,(void *)TRUE);
|
||||
app.SetAction(ProfileManager.GetPrimaryPad(),eAppAction_ExitWorld,(void *)true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2049,7 +2049,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
}
|
||||
BOOL allAllowed, friendsAllowed;
|
||||
ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed);
|
||||
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE),
|
||||
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=true && friendsAllowed==true),
|
||||
packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex ))));
|
||||
|
||||
if(!g_NetworkManager.IsHost() )
|
||||
@@ -3162,7 +3162,7 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
|
||||
HXUICLASS thisClass = XuiFindClass( L"CXuiSceneTrading" );
|
||||
HXUICLASS objClass = XuiGetObjectClass( scene );
|
||||
|
||||
// Also returns TRUE if they are the same (which is what we want)
|
||||
// Also returns true if they are the same (which is what we want)
|
||||
if( XuiClassDerivesFrom( objClass, thisClass ) )
|
||||
{
|
||||
CXuiSceneTrading *screen;
|
||||
|
||||
Reference in New Issue
Block a user