Mounting multiple games
Jump to navigation
Jump to search
This guide has been obsoleted by the Orange Box. Use gameinfo.txt's new
AdditonalContentID
feature instead.The following short section of code allows you to mount additional files from the following games:
- Counter Strike Source,
- Hl2MP,
- Episode 1,
- Episode 2,
- Team Fortress 2
- Portal
- Day of Defeat Source,
- Half Life 2 (fixes),
This code will now fix bugs which may be featured with a game, also this allows you use the CS:S and DOD:S etc maps.. Though the info_player_*** will not work, you'll have to bind that to the original info_player_start which isn't hard.

After the big list of conditions to return false in CHLClient::Init - and paste this:
filesystem->AddSearchPath("hl2mp", "GAME"); filesystem->AddSearchPath("hl2", "GAME"); filesystem->AddSearchPath("episodic", "GAME"); filesystem->AddSearchPath("dod", "GAME"); filesystem->AddSearchPath("cstrike", "GAME"); filesystem->AddSearchPath("tf", "GAME"); filesystem->AddSearchPath("portal", "GAME"); filesystem->AddSearchPath("ep2", "GAME"); filesystem->AddSearchPath("hl1", "GAME"); filesystem->AddSearchPath("hl1mp", "GAME"); filesystem->AddSearchPath("lostcoast", "GAME");

Now open GameInterface.cpp (SERVERSIDE)
After the list of conditions to return false in CServerGameDLL::DLLInit - and paste the same code above.
Compile or rebuild and run your game.

Add Order
You can also select how the path should be added to the directory table, to affect the priority given to files of the same name:
filesystem->AddSearchPath("dod", "GAME", PATH_ADD_TO_TAIL); //Add to the Tail filesystem->AddSearchPath("dod", "GAME", PATH_ADD_TO_HEAD); //Add to the Head