mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-30 14:44:41 +00:00
Some cleanup
Just a bit. i dont want to clean all the ifdef for consoles right now
This commit is contained in:
@@ -209,25 +209,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
// Load the tutorial save data here
|
||||
if(param->levelGen->requiresBaseSave() && !param->levelGen->getBaseSavePath().empty() )
|
||||
{
|
||||
#ifdef _XBOX
|
||||
#ifdef _TU_BUILD
|
||||
wstring fileRoot = L"UPDATE:\\res\\GameRules\\" + param->levelGen->getBaseSavePath();
|
||||
#else
|
||||
wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\" + param->levelGen->getBaseSavePath();
|
||||
#endif
|
||||
#else
|
||||
#ifdef _WINDOWS64
|
||||
wstring fileRoot = L"Assets/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__ORBIS__)
|
||||
wstring fileRoot = L"/app0/orbis/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__PSVITA__)
|
||||
wstring fileRoot = L"PSVita/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#elif defined(__PS3__)
|
||||
wstring fileRoot = L"PS3/Tutorial/" + param->levelGen->getBaseSavePath();
|
||||
#else
|
||||
wstring fileRoot = L"Tutorial\\" + param->levelGen->getBaseSavePath();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File grf(fileRoot);
|
||||
if (grf.exists())
|
||||
{
|
||||
@@ -441,40 +424,16 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
if (GetPlayerCount() > 1) // Are we offline or online, and how many players are there
|
||||
{
|
||||
if (IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(primaryPad,CONTEXT_PRESENCE_MULTIPLAYER_1P,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
|
||||
|
||||
@@ -549,21 +508,9 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
|
||||
{
|
||||
app.SetRichPresenceContext(idx,CONTEXT_GAME_STATE_BLANK);
|
||||
if (IsLocalGame())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(idx,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(idx,CONTEXT_PRESENCE_MULTIPLAYER,false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1650,40 +1597,16 @@ void CGameNetworkManager::PlayerJoining( INetworkPlayer *pNetworkPlayer )
|
||||
if (multiplayer)
|
||||
{
|
||||
if (localgame)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYEROFFLINE, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYEROFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (localgame)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE);
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MULTIPLAYER_1P, false);
|
||||
#endif
|
||||
}
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_MULTIPLAYER_1P);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1713,11 +1636,7 @@ void CGameNetworkManager::PlayerLeaving( INetworkPlayer *pNetworkPlayer )
|
||||
{
|
||||
if( pNetworkPlayer->IsLocal() )
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
#else
|
||||
ProfileManager.SetCurrentGameActivity(pNetworkPlayer->GetUserIndex(),CONTEXT_PRESENCE_IDLE,false);
|
||||
#endif
|
||||
g_DiscordPresence.SetCurrentGameActivity(CONTEXT_PRESENCE_IDLE);
|
||||
|
||||
TelemetryManager->RecordPlayerSessionExit(pNetworkPlayer->GetUserIndex(), app.GetDisconnectReason());
|
||||
}
|
||||
@@ -2179,22 +2098,4 @@ void CGameNetworkManager::FakeLocalPlayerJoined()
|
||||
{
|
||||
s_pPlatformNetworkManager->FakeLocalPlayerJoined();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
bool CGameNetworkManager::usingAdhocMode()
|
||||
{
|
||||
return ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->usingAdhocMode();
|
||||
}
|
||||
|
||||
void CGameNetworkManager::setAdhocMode(bool bAdhoc)
|
||||
{
|
||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->setAdhocMode(bAdhoc);
|
||||
}
|
||||
|
||||
void CGameNetworkManager::startAdhocMatching()
|
||||
{
|
||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)->startAdhocMatching();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user