User:Psycommando/Alien Swarm Disabling Steam Integration
Disable Steam integration
Client
Add the define "NO_STEAM" in : CLIENT project's properties->Configuration Properties->C/C++->Preprocessor->preprocessor Definition That's essentially what the programmers had planned to turn off steam integration. But, it doesn't work like it should...
You need to replace one line of the "src\game\client\swarm\vgui\nb_lobby_row.cpp" file :
at line 484 :
pMainPanel->m_FlyoutSteamID = Briefing()->GetCommanderSteamID( m_nLobbySlot ).ConvertToUint64();
Replace with this :
//PsyCommando : Fix compile for no steam, I hope that's not important!
#ifndef NO_STEAM
pMainPanel->m_FlyoutSteamID = Briefing()->GetCommanderSteamID( m_nLobbySlot ).ConvertToUint64();
#endif
For this to work in the latest codebase, in date of August 2 2010, 2 lines must be fixed in the file
"src\game\client\swarm\asw_medal_store.cpp"
Replace Line 54 with this :
AssertMsg( false, "SteamCloud not available." ); //<--Line 54
//psycommando : Fix for NO_STEAM
char szMedalFile[ 256 ];
Q_snprintf( szMedalFile, sizeof( szMedalFile ), "cfg/clientc.dat");
Replace Line 332 with this :
//psycommando : Fix for NO_STEAM
#ifdef NO_STEAM
Q_snprintf( szMedalFile, sizeof( szMedalFile ), "cfg/clientc.dat" );
#else
Q_snprintf( szMedalFile, sizeof( szMedalFile ), "cfg/clientc_%I64u.dat", pSteamUser->GetSteamID().ConvertToUint64() );
#endif
Update 2
Here is how to fix the menu when NO_STEAM is activated. To override that annoying feature just comment the following lines :
- "src\game\client\swarm\gameui\swarm\vmainmenu.cpp" - Line 1037
//if ( !g_pMatchFramework->GetMatchSystem()->GetPlayerManager()->GetLocalPlayer( 0 ) ) //psycommando : disable fake menu
//{
// pSettings = "Resource/UI/BaseModUI/MainMenuStub.res";
//}
Server
Ok, next on, we set NO_STEAM on the server, we do the same thing we did on the client, in the server's project properties. So add NO_STEAM to the SERVER project's properties->Configuration Properties->C/C++->Preprocessor->preprocessor Definition
Now, there's a debugging macro left by valve that for some reason has code to access the steam api in it...
"src\public\engine\thinktracecounter.h" - Line 39
Replace this :
static bool bIsPublic = steamapicontext->SteamUtils() != NULL && steamapicontext->SteamUtils()->GetConnectedUniverse() == k_EUniversePublic;
with this :
#ifndef NO_STEAM
static bool bIsPublic = steamapicontext->SteamUtils() != NULL && steamapicontext->SteamUtils()->GetConnectedUniverse() == k_EUniversePublic;
#else
static bool bIsPublic = false;
#endif
Another ugly fix. Just recompile your code, and then that's it, at least it work for me...