alliedmodders/metamod-source — pull request #5 by psychonic (2014-06-04 16:36:27+00:00)
Title: Improve game detection in core (bug 6020).

See bug 6020 for background, https://bugs.alliedmods.net/show_bug.cgi?id=6020

This commit slightly reorders MM:S initialization logic so that the engine ptr is available in the provider before mm_DetectGameInformation is called. This allows us to just use engine->GetGameDir to get the absolute path to the game directory, rather than hoping -game is specified and calculating absolute path from there.

Tested on CS:GO with VSP loading, Dota 2 with GameDLL loading, and Dark Messiah (our old case for the "." fallback) with VSP loading.