User:Psycommando/Alien Swarm Disabling Steam Integration
When I first used the code of the Alien Swarm SDK, downloaded on July 29 2010, there were a few issues and crashes caused by the steam integration. Since I don't want to save stats, and I want to test my code changes, I decided to thrash the whole thing.
Hopefully, the nice devs were thoughtful enough to provide a define to disable steam integration. But it doesn't work right out of the box, there are two place that need to be changed in order to compile/work correctly :
Client Fixes
I've been able to fix those problems by adding 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
It's a very ugly fix and I'm still trying to see if it breaks anything.
Server Fix
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. And that's it, at least it work for me...